惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog RSS Feed
J
Java Code Geeks
H
Help Net Security
Google DeepMind News
Google DeepMind News
博客园 - 司徒正美
Microsoft Security Blog
Microsoft Security Blog
宝玉的分享
宝玉的分享
Stack Overflow Blog
Stack Overflow Blog
D
DataBreaches.Net
The GitHub Blog
The GitHub Blog
S
SegmentFault 最新的问题
U
Unit 42
博客园 - 三生石上(FineUI控件)
Last Week in AI
Last Week in AI
M
MIT News - Artificial intelligence
WordPress大学
WordPress大学
小众软件
小众软件
博客园 - 叶小钗
D
Docker
量子位
P
Proofpoint News Feed
博客园_首页
T
Tailwind CSS Blog
F
Fortinet All Blogs

LangChain Forum - Latest topics

Seeking help regarding the connection between Websocket and tool calls Tool invocation error with empty error message when using `InjectedState` + `Command` return in async tool How to use @langchain/react FileSystem middleware Using ChatSnowflake with agents Built llmsessioncontract on AgentMiddleware: runtime enforcement of tool-call protocols — feedback wanted DeltaChannelHistory not found in langgraph-api:3.12 Improving citation accuracy and reducing hallucinations in custom Parent-Child RAG pipeline (Gemma3:4B + FAISS+BM25 + Cross-encoder reranker) Built a live autonomous AI agent network using LangGraph-style economics — looking for feedback How are you validating LangChain agent output before it executes shell commands? Cross-site pattern pool for production agent failures — looking for 5 pilot teams (open spec, CC-BY-4.0) Metadata filter not filtering for alerts Using custom MCP servers with assistants How to use tool calling using ChatLlamaCpp and Gemma 4 E4B with create_agent? CLI - No Longer Sending traces to Langsmith Connecting the Slack integration fails with invalid_team_for_non_distributed_app The Docs says open router can be used with init_chat_model but throws an error Interested to contribute to langgraph postgre checkpointer for multiple adapter support Modal Inference Trouble understanding and editing experiment summary evaluators feedbacks SSL certificate error from httpx with LangGraph server [Feature Request] Wire allowed_msgpack_modules in langgraph.json Serving an agent with the LangGraph CLI dev command Proposal: implement delete_for_runs for SQLite checkpoint savers WikipediaLoader endup in JSONDecodeError Human-in-the-loop approval dashboard for LangGraph agents — open source, free to deploy Ombre — open source security and audit layer for LangChain apps Should interrupt() be split into two primitives — one for human input, one for s2s data fetching? Unable to delete runs from annotation queue First Bedrock call after idle is slow on TTFT (follow-ups in the same trace are fast)
Gmail MCP Error -32603: Tool execution failed
2026-04-06 · via LangChain Forum - Latest topics

4/6/2026 update:

The problem fixed itself today when I rerun. Thank you.





Below is the original post:

I receive many newsletter subscriptions that I don’t have time to read. To manage this, I created an agent in Fleet to summarize each newsletter into a single sentence. The agent worked perfectly for a few days, but earlier this week, it began encountering a Gmail connection error.

Although I haven’t changed the code or settings, I keep receiving the following error: "MCP Error -32603: Tool execution failed: Agent auth failed: HTTP 400: {"detail":"Unknown provider: google-langsmith-prod"}".

Because the agent can no longer connect to my mailbox, it cannot read the incoming emails. I have attempted the following troubleshooting steps without success:

  1. Reconnecting Gmail in Fleet Integrations: I tried this multiple times, and although it confirms the connection is successful, the error persists.

  2. Debugging via Agent Session: I pasted Gemini’s debugging proposals into the agent’s edit session and asked it to verify its tools and code, but the issue remains.

  3. Reviewing Prompts and Toolboxes: I verified that the procedures are clearly stated in the agent’s instructions and confirmed that the toolbox contains all necessary Gmail tools.

Below are the code for the extract.pyand tools.json

import json
import re
from bs4 import BeautifulSoup

def clean_html(html_content):
    soup = BeautifulSoup(html_content, 'html.parser')
    text = soup.get_text(separator=' ', strip=True)
    # clean up multiple spaces
    text = re.sub(r'\s+', ' ', text)
    return text

def extract_links(html_content):
    soup = BeautifulSoup(html_content, 'html.parser')
    links = []
    for a in soup.find_all('a', href=True):
        href = a['href']
        # basic heuristic for news article links
        if 'facebook.com' in href or 'twitter.com' in href or 'instagram.com' in href or 'youtube.com' in href:
            continue
        if 'unsubscribe' in href.lower() or 'privacy' in href.lower() or 'terms' in href.lower():
            continue
        if 'liveintent' in href or 'cmail20.com' in href:
            continue
        if href.startswith('http'):
            links.append(href)
    
    # remove duplicates while preserving order
    seen = set()
    unique_links = []
    for link in links:
        # For SF chronicle, they use tracking links. We just keep them if they are unique.
        if link not in seen:
            seen.add(link)
            unique_links.append(link)
            
    return unique_links[:10]

def main():
    file_path = '/large_tool_results/xxx'
    output_path = '/memories/extracted_news_content.json'
    
    with open(file_path, 'r', encoding='utf-8') as f:
        emails = json.load(f)
        
    target_subjects = [
        "The Morning: Confronting the chaos",
        "The 10-Point: A First Lady",
        "This Tahoe town is losing the fight against",
        "Tahoe town’s losing battle"
    ]
    
    results = []
    
    for email in emails:
        subject = email.get('subject', '')
        if any(ts in subject for ts in target_subjects):
            body = email.get('body', '')
            cleaned_text = clean_html(body)
            body_text = cleaned_text[:2500]
            top_links = extract_links(body)
            
            results.append({
                "subject": subject,
                "body_text": body_text,
                "top_links": top_links
            })
            
    with open(output_path, 'w', encoding='utf-8') as f:
        json.dump(results, f, indent=2)

if __name__ == '__main__':
    main()
```
{
  "tools": [
    {
      "name": "notion-search",
      "mcp_server_url": "https://mcp.notion.com/mcp",
      "mcp_server_name": null,
      "display_name": "notion-search"
    },
    {
      "name": "notion-create-pages",
      "mcp_server_url": "https://mcp.notion.com/mcp",
      "mcp_server_name": null,
      "display_name": "notion-create-pages"
    },
    {
      "name": "notion-fetch",
      "mcp_server_url": "https://mcp.notion.com/mcp",
      "mcp_server_name": null,
      "display_name": "notion-fetch"
    },
    {
      "name": "notion-update-page",
      "mcp_server_url": "https://mcp.notion.com/mcp",
      "mcp_server_name": null,
      "display_name": "notion-update-page"
    },
    {
      "name": "notion-move-pages",
      "mcp_server_url": "https://mcp.notion.com/mcp",
      "mcp_server_name": null,
      "display_name": "notion-move-pages"
    },
    {
      "name": "notion-create-database",
      "mcp_server_url": "https://mcp.notion.com/mcp",
      "mcp_server_name": null,
      "display_name": "notion-create-database"
    },
    {
      "name": "tavily_web_search",
      "mcp_server_url": "https://tools.langchain.com",
      "mcp_server_name": "Fleet",
      "display_name": "tavily_web_search"
    },
    {
      "name": "gmail_draft_email",
      "mcp_server_url": "https://tools.langchain.com",
      "mcp_server_name": "Fleet",
      "display_name": "gmail_draft_email"
    },
    {
      "name": "gmail_send_email",
      "mcp_server_url": "https://tools.langchain.com",
      "mcp_server_name": "Fleet",
      "display_name": "gmail_send_email"
    },
    {
      "name": "gmail_mark_as_read",
      "mcp_server_url": "https://tools.langchain.com",
      "mcp_server_name": "Fleet",
      "display_name": "gmail_mark_as_read"
    },
    {
      "name": "gmail_archive_email",
      "mcp_server_url": "https://tools.langchain.com",
      "mcp_server_name": "Fleet",
      "display_name": "gmail_archive_email"
    },
    {
      "name": "gmail_get_thread",
      "mcp_server_url": "https://tools.langchain.com",
      "mcp_server_name": "Fleet",
      "display_name": "gmail_get_thread"
    },
    {
      "name": "gmail_read_emails",
      "mcp_server_url": "https://tools.langchain.com",
      "mcp_server_name": "Fleet",
      "display_name": "gmail_read_emails"
    }
  ],
  "interrupt_config": {}
}
```