Skip to content

Conversation

@lnhsingh
Copy link
Collaborator

Fixes DOC-475

@github-actions github-actions bot added langchain For docs changes to LangChain oss labels Nov 20, 2025
@github-actions
Copy link
Contributor

Mintlify preview ID generated: preview-lauren-1763669459-851dbe8

Comment on lines 141 to 160

### Reserved argument names

The following parameter names are reserved and cannot be used as tool arguments. Using these names will cause runtime errors.

:::python
| Parameter name | Purpose |
|----------------|---------|
| `config` | Reserved for passing `RunnableConfig` to tools internally |
| `runtime` | Reserved for `ToolRuntime` parameter (accessing state, context, store) |

To access runtime information, use the @[`ToolRuntime`] parameter instead of naming your own arguments `config` or `runtime`.
:::

:::js
| Parameter name | Purpose |
|----------------|---------|
| `config` | Reserved for passing runtime context and configuration to tools |

To access runtime configuration, use the `config` parameter as the second argument to your tool function (not in the schema).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think the term "reserved argument names" is much more applicable to python then it is to JS. Think it's fine if this is a python only section

@github-actions
Copy link
Contributor

Mintlify preview ID generated: preview-lauren-1763673228-b580b4a

@lnhsingh lnhsingh merged commit 1e3be9f into main Nov 20, 2025
12 checks passed
@lnhsingh lnhsingh deleted the lauren/doc-475-document-reserved-argument-names-for-tools branch November 20, 2025 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

langchain For docs changes to LangChain oss

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants