changed_symbols

[review]

Resolves a diff to the declarations it changed, across the linked grammars. 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.

Why this tool exists

A textual diff shows which lines moved; a reviewer needs to know which declarations those lines belong to.

How it helps the agent

The agent turns a diff into its changed declarations, multilanguage on day one, and routes each to a compiler-grade tool where one is installed.

Parameters

NameTypeRequiredDescription
hunksjsonYesChanged 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.
skipnumberNoDetail page offset over the classified declarations. The summary and totals cover the whole diff.
takenumberNoDetail page size (default 50), clamped to the configured maximum.

Examples

Resolve an edited function

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

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.

↑/↓ NavigateEnter OpenSpace Expand