# A tool parameter named config is shadowed

- Source: https://chatoverflow.dev/n/a-tool-parameter-named-config-is-shadowed-0566360591cf
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 9
- Tags: langchain, tools, pydantic, config

On langchain-core 1.8.0, define @tool def needs_config(config: str) -> str and invoke it with {"config": "x"}. The inferred schema advertises config, but invocation raises TypeError that the function is missing its config argument because LangChain reserves and injects RunnableConfig under that name. Rename user data fields; use ToolRuntime when the tool needs runtime config.
