LangChain invalid tool calls: what Sume returns on a bad call
After LangChain 1.4.3 repairs an invalid tool call, Sume may still return an isError result, such as tool_not_found with a hint. Keep the same idempotency_key.

A repaired tool call can still be wrong for Sume. When it is, Sume returns the failure as an MCP tool result with isError: true, not as a JSON-RPC error, so the agent can read the message and fix the next call. A paid retry should keep the same idempotency_key.
The LangChain 1.4.3 release (2026-09-28) lists the line "fix(langchain): repair invalid tool calls in create_agent (#40530)". The notes give no further detail, so this post covers only the Sume side, from MCP tools and gates and the MCP server code, read 2026-10-01.
What does the agent see when a tool name is wrong?
If the name misses the visible catalog but matches a registered tool spelled differently, the error text is Unknown remote MCP tool: <name>. Did you mean followed by the registered name, with the stable code tool_not_found. That hint is what a repair step can use. tools_list shows every tool visible in the session, and tools_schema fetches one contract by name.
Which Sume failures come back as tool results?
The server code returns tool execution failures as MCP tool results (isError: true) from the call path, and keeps JSON-RPC errors for protocol-level problems.
| Case | What comes back | Code or detail |
|---|---|---|
| Misspelled tool name | Tool result with a suggestion | tool_not_found |
| Write or paid tool in a read-only OAuth session | Tool result naming the missing scope | insufficient_scope, required_scope mcp:write |
| No usable credential forwarded | Tool result asking for x-api-key or Bearer auth | mcp_auth_forwarding_unavailable |
| Unsupported JSON-RPC method | JSON-RPC error | -32601 |
Should a repaired paid call get a new idempotency key?
No. idempotency_key is required on write and paid tools, and the docs call it a stable key for transport and dedup. If the first attempt may have reached Sume, a repaired retry should carry the same key so it is treated as the same request. Generate the key once per intended job in your agent state, not once per model output.
How do I keep the agent from guessing?
Put the tools_schema result in context before a paid call, and let the model use dry_run=true first when cost matters. Scope matters too: an OAuth session with only mcp:read sees read-only tools, while an API key sees the full hosted set. For approval patterns around paid tools, see LangChain MCP adapter approval for paid Sume tools.
Sources
Related posts
More in Developers
- LLaDA-Image is open weights: Sume's Image API is a hosted catalog
LLaDA-Image (6B, Apache 2.0, released 2026-09-04) is a download, not an API id. Sume does not list it; use a catalog model with a text-in-image prompt.
- LMNT has shut down: what to know moving to Sume TTS
LMNT's site says it has shut down. If you move to Sume TTS 1.0, voice ids do not carry over, language must be set for non-English text, and text caps at 20000.
- LTX-2 license: models trained on its Outputs are derivatives
The LTX-2 Community License lists models trained on Outputs as Derivatives that must ship under the same license. What the text says and what it leaves open.
- LTX /v1/extend limits, and chaining clips with Sume frame_images
LTX's /v1/extend is 1080p only, adds 2-20 seconds, needs 73+ input frames. Sume has no extend call here: chain clips with frame_images, then join in Timeline.
Written by Sume