set_state_schema
Define a new state schema for your LangGraph graph by specifying fields with types, reducers, and defaults. Replaces the existing schema entirely to adapt graph behavior.
Instructions
Replace the graph's state schema wholesale.
Each field: {name, type, reducer?, default?}. type is a raw Python
type expression (e.g. "str", "list[str]"); reducer names a reducer
function (e.g. "add_messages", or a custom name defined in reducers.py).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_dir": "<project_dir>",
"fields": "<fields>"
},
"name": "set_state_schema"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | Yes | ||
| project_dir | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||