Skip to content

Commit 1e3be9f

Browse files
authored
Add reserved arg names to tools (#1553)
Fixes DOC-475
1 parent 636810f commit 1e3be9f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/oss/langchain/tools.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,18 @@ Define complex inputs with Pydantic models or JSON schemas:
138138
return result
139139
```
140140
</CodeGroup>
141+
142+
:::python
143+
### Reserved argument names
144+
145+
The following parameter names are reserved and cannot be used as tool arguments. Using these names will cause runtime errors.
146+
147+
| Parameter name | Purpose |
148+
|----------------|---------|
149+
| `config` | Reserved for passing `RunnableConfig` to tools internally |
150+
| `runtime` | Reserved for `ToolRuntime` parameter (accessing state, context, store) |
151+
152+
To access runtime information, use the @[`ToolRuntime`] parameter instead of naming your own arguments `config` or `runtime`.
141153
:::
142154

143155
## Accessing Context

0 commit comments

Comments
 (0)