VectleSkillsToolRuntime error: Required fields tool_runtime missing in LangGraph

ToolRuntime error: Required fields tool_runtime missing in LangGraph

Export

Fixes "Required fields tool_runtime missing" when invoking a LangGraph tool that declares a ToolRuntime parameter. Use when a tool with tool_runtime: ToolRuntime fails inside a hand-built StateGraph with ToolNode on langgraph 1.0.x. Known bug fixed in langchain 1.0.5; upgrade or switch to create_agent. Not for tools without runtime params.

ToolRuntime error: Required fields tool_runtime missing in LangGraph

TL;DR: on langgraph 1.0.3 / langchain 1.0.0, a tool that declares tool_runtime: ToolRuntime fails when run through a hand-built ToolNode because the runtime is never injected. Upgrade to langchain>=1.0.5 (known bug #6318, fixed there) or switch to create_agent(), which injects it for you.

ToolRuntime error: Required fields tool_runtime missing

When this applies

  • Your tool signature includes tool_runtime: ToolRuntime (from langchain.tools).
  • You built the graph yourself: StateGraph + ToolNode(tools).
  • langgraph==1.0.3, langchain==1.0.0 (or nearby 1.0.x).

When it does not

  • If the tool has no ToolRuntime param, this error cannot happen. Look at the real traceback.
  • create_agent() users on the same versions generally do not hit this.

Fix it

1. Upgrade langchain

# terminal
pip install -U "langchain>=1.0.5" "langgraph>=1.0.0"

Expected: the same tool + ToolNode code now runs. The bug (langchain-ai/langgraph#6318) was in runtime injection, fixed in 1.0.5.

2. Or switch to create_agent

from langchain.agents import create_agent
from langchain.tools import tool, ToolRuntime

@tool
def foo_tool(tool_runtime: ToolRuntime) -> str:
    """Explain what the tool does."""
    return f"store={tool_runtime.store}"

agent = create_agent(model, tools=[foo_tool])

Expected: create_agent wires ToolRuntime injection automatically, no manual ToolNode needed.

3. Or drop the runtime param if you do not need it

If you added ToolRuntime speculatively, remove it and read what you need from the state instead:

@tool
def foo_tool(query: str) -> str:
    return search(query)

Expected: the tool runs anywhere, no injection required.

Why it happens

ToolRuntime is a special injected parameter (like InjectedState): the framework is supposed to fill it in at call time with the store, stream writer, and config. In the 1.0.0-1.0.4 window, the manual ToolNode path skipped that injection, so the tool saw a missing required field. create_agent had the correct wiring all along.

Edge cases

  • After upgrading, delete stale .pyc/caches if the error persists: an old langchain can shadow the new one in editable installs.
  • InjectedToolCallId and InjectedState had related injection gaps in the same window; upgrade fixes those too.
  • If you pin versions in a lockfile, bump both langchain and langgraph together. Mixing 1.0.5 langchain with 1.0.0 langgraph reintroduces edge cases.

Compatibility

langgraph/langchain 1.0.x (Python). Broken: langchain 1.0.0-1.0.4 with manual ToolNode. Fixed: langchain >= 1.0.5.

Published recentlyPublished Oct 3, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 1, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=ToolRuntime+error%3A+Required+fields+tool_runtime+missing+in+LangGraph&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.