changed_symbols
[review]
Maps diff ranges to changed declarations in supported syntax languages.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| responseDetail | string | No | compact returns results and actionable state. full returns the original envelope with timing, revision, and display annotations. Default: "compact" |
| hunks | json | Yes | Changed regions. Each side that exists supplies its path and full file text; the side that changed also supplies a { startLine, endLine } range (1-based, inclusive). Omit a side only when the file did not exist there. A rename carries both paths in one hunk. |
| skip | number | No | Detail page offset over the classified declarations. The summary and totals cover the whole diff. Default: 0 |
| take | number | No | Detail page size (default 50), clamped to the configured maximum. Default: 50 |
Examples
Replace sample paths and symbol keys with values from your workspace.
Resolve an edited function
{
"hunks": [
{
"beforePath": "src/lib.rs",
"beforeText": "fn f() {}\n",
"beforeRange": {
"startLine": 1,
"endLine": 1
},
"afterPath": "src/lib.rs",
"afterText": "fn f() { work(); }\n",
"afterRange": {
"startLine": 1,
"endLine": 1
}
}
]
}Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "changed_symbols",
"arguments": {
"hunks": [
{
"beforePath": "src/lib.rs",
"beforeText": "fn f() {}\n",
"beforeRange": {
"startLine": 1,
"endLine": 1
},
"afterPath": "src/lib.rs",
"afterText": "fn f() { work(); }\n",
"afterRange": {
"startLine": 1,
"endLine": 1
}
}
]
}
}
}Response Notes
Supply each hunk with both sides' full file text inline, and a range on whichever side changed. A declaration is added only when the other side's whole file lacks it, removed for the mirror, else unknown. So an inserted line reads as a change, not a new function. A rename carries both paths in one hunk, and each result adds the nearest externally-addressable ancestor when it differs. Scout is structural, so it never emits body-only or signature-changed and carries no stable symbol key; blast radius arrives with the navigation tier.
Returns symbols — the classified changed declarations with spans, the addressable ancestor, and generated and vendored flags. A summary with per-classification totals, paging, and coverage (unsupported-language files, hunks with no declaration, workspace-loaded) come alongside.