trace_state_updates
Find every location that updates a state variable, including setter calls, trigger events, and async/conditional details. Map state flow without reading entire files.
Instructions
Find all locations that update a state variable. Returns setter calls with context (handler, useEffect, inline), trigger events, and whether updates are async/conditional. Helps understand state flow without reading entire files.
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": {
"projectPath": "<projectPath>",
"filePath": "<filePath>",
"stateName": "<stateName>"
},
"name": "trace_state_updates"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max updates to return (default: 20, max: 50) | |
| filePath | Yes | File containing the state | |
| stateName | Yes | State variable name (e.g., "count", "user", "isLoading") | |
| projectPath | Yes | Root path of the project | |
| componentName | No | Specific component to analyze |