LangChain Docs
https://docs.langchain.com/mcp
Search, browse, and read LangChain documentation pages, and report documentation problems to the docs team.
81.0/100
#14 of 33 · #13 in Docs & knowledge
Fix it with your coding agent
Free. Paste this into Claude Code, Cursor or Codex inside your server's repo.
Improve the MCP server at https://docs.langchain.com/mcp so AI agents can use it better. It scored 81/100 (B+) on the Agnost MCP Leaderboard.
Top fixes:
1. Agents got stuck retrying in 22% of tasks.
2. Trim query_docs_filesystem_docs_by_lang_chain's description under 2 KB: keep the supported commands, path layout, and one example, and move extended usage guidance into a server resource.
3. Add outputSchemas: result shape (title, URL, snippet) for search_docs_by_lang_chain, stdout/text format for the filesystem query, and a confirmation/ID for submit_feedback.
Per-tool fixes:
- search_docs_by_lang_chain: Expand the query param description: 'Natural-language or keyword query, e.g. "how to stream tokens with LangGraph"; returns top matching chunks with titles and page paths.' 'query' param described only as 'Search query' with no guidance on phrasing or length No mention of result count or ranking No outputSchema — agents can't tell what the tool returns
- query_docs_filesystem_docs_by_lang_chain: Shorten the statelessness and cd explanation to one sentence and merge the duplicate guidance on reading pages. Very long; some sentences repeat the same point (stateless/cd explanation, path conversion) Description is over 2 KB — Claude Code truncates tool metadata at 2 KB No outputSchema — agents can't tell what the tool returns
- submit_feedback: Add: 'Sends the feedback to the LangChain docs team and returns a confirmation; only submit when the user agrees or a clear doc error is found.' Doesn't say the feedback is sent externally to the docs team or what it returns Doesn't say whether to confirm with the user before submitting No outputSchema — agents can't tell what the tool returns
Keep tool names stable. Add readOnlyHint/destructiveHint annotations and outputSchema where missing.Score breakdown
Weighted by what breaks agents in 100M+ real MCP calls.
Error quality
5 bad-input tests · 4 clear errors
83/100 · 20 pts
↳ Clear errors that name the fix get ~3× more successful retries
Task success across agents
opus-5-5: 3/3 · haiku-5-5: 2/3 · gpt-5.5: 3/3 · first-call success 100% · 1.8 calls/task
83/100 · 15 pts
↳ The same tool can fail 0% of the time in one client and 13% in another
Tool count & token cost
3 tools · ~2,208 tokens · 1 overlapping pairs
94/100 · 15 pts
↳ The top 3 tools usually get >99% of calls; the rest just cost context
Schema & docs accuracy
Descriptions 87/100 · 0/3 declare outputSchema
82/100 · 15 pts
↳ Declared output schemas that don't match real output break calls
Response size
median ~7,512 tokens · p95 ~15,122 · no limit params
44/100 · 10 pts
↳ Big responses overflow the agent's context; ~30% of search responses exceed 25k tokens
Latency & long calls
median 646ms · p95 6181ms · 0 timeouts
90/100 · 10 pts
↳ After a client cancels a long call, ~39% of sessions end
Connection & login
handshake 755ms · Streamable HTTP
100/100 · 10 pts
↳ After a login or permission error, ~1 in 5 sessions end
Metadata & discoverability
metadata 45/100 · Listed in the official MCP Registry ✕ · mcp.json manifest ✓ · Setup page in the browser ✕
39/100 · 5 pts
↳ The basics. Necessary, but not what makes agents succeed
What your errors look like to an agent
We sent deliberately bad inputs. Errors that name the bad field and the valid values get ~3× more successful retries in real agent traffic.
Left out a required field · search_docs_by_lang_chain.query
Model sees it · "Input validation error: Invalid arguments for tool search_docs_by_lang_chain: query: Required"
Sent the wrong type · search_docs_by_lang_chain.query
Model sees it · "Input validation error: Invalid arguments for tool search_docs_by_lang_chain: query: Expected string, received number"
Left out a required field · query_docs_filesystem_docs_by_lang_chain.command
Model sees it · "Input validation error: Invalid arguments for tool query_docs_filesystem_docs_by_lang_chain: command: Required"
Sent the wrong type · query_docs_filesystem_docs_by_lang_chain.command
Model sees it · "Input validation error: Invalid arguments for tool query_docs_filesystem_docs_by_lang_chain: command: Expected string, received number"
Called a tool that doesn't exist · —
Protocol error (often hidden from the model) · "Tool __agnost_nonexistent_tool__ not found"
We let a real AI agent use it
3 AI models got realistic tasks and the full tool list. We checked if the first call was right, how many calls it took, and if it finished the job. It used ~9,967 tokens per task on average.
opus-5-5How do I add memory to a LangGraph agent so it remembers previous conversation turns?
Right tool first try · 9.2s · search_docs_by_lang_chain
opus-5-5Find the LangChain docs on using structured output with ChatOpenAI.
Right tool first try · 7.7s · search_docs_by_lang_chain
opus-5-5List the documentation pages available under the LangSmith section of the LangChain docs.
Right tool first try · 21.4s · query_docs_filesystem_docs_by_lang_chain → query_docs_filesystem_docs_by_lang_chain → query_docs_filesystem_docs_by_lang_chain
haiku-5-5How do I add memory to a LangGraph agent so it remembers previous conversation turns?
Right tool first try · 5.5s · search_docs_by_lang_chain
haiku-5-5Find the LangChain docs on using structured output with ChatOpenAI.
Right tool first try · 3.6s · search_docs_by_lang_chain
haiku-5-5List the documentation pages available under the LangSmith section of the LangChain docs.
Didn't finish in 4 turns · 8.4s · query_docs_filesystem_docs_by_lang_chain → query_docs_filesystem_docs_by_lang_chain → query_docs_filesystem_docs_by_lang_chain → query_docs_filesystem_docs_by_lang_chain → query_docs_filesystem_docs_by_lang_chain
gpt-5.5How do I add memory to a LangGraph agent so it remembers previous conversation turns?
Right tool first try · 6.5s · search_docs_by_lang_chain
gpt-5.5Find the LangChain docs on using structured output with ChatOpenAI.
Right tool first try · 5.3s · search_docs_by_lang_chain
gpt-5.5List the documentation pages available under the LangSmith section of the LangChain docs.
Right tool first try · 7.8s · query_docs_filesystem_docs_by_lang_chain → query_docs_filesystem_docs_by_lang_chain
Top 3 fixes
- 1
Agents got stuck retrying in 22% of tasks.
- 2
Trim query_docs_filesystem_docs_by_lang_chain's description under 2 KB: keep the supported commands, path layout, and one example, and move extended usage guidance into a server resource.
- 3
Add outputSchemas: result shape (title, URL, snippet) for search_docs_by_lang_chain, stdout/text format for the filesystem query, and a confirmation/ID for submit_feedback.