Browse documentation

changed_symbols

[callgraph]

Resolves changed line ranges to the declarations containing them, with symbol keys and change classification.

Try it locally in the TGlider playground

Parameters

NameTypeRequiredDescription
hunksjsonYesChanged ranges. Each carries beforePath, beforeRange, afterPath, and afterRange; both paths are nullable, and both are carried so a rename stays one result.
beforeFilesjsonNoThe prior text of each changed file. Required to classify a modification; a pure addition needs none.
skipnumberNoNumber of matching results to skip. Default: 0
takenumberNoMaximum number of matching results to return.

Examples

Replace sample paths and symbol keys with values from your workspace.

Resolve a review hunk to the declaration it changed

Arguments
{
  "hunks": [
    {
      "beforePath": "src/app.ts",
      "beforeRange": {
        "startLine": 10,
        "endLine": 12
      },
      "afterPath": "src/app.ts",
      "afterRange": {
        "startLine": 10,
        "endLine": 14
      }
    }
  ],
  "beforeFiles": [
    {
      "path": "src/app.ts",
      "content": "// previous contents"
    }
  ]
}
Full MCP request
Full MCP request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "changed_symbols",
    "arguments": {
      "hunks": [
        {
          "beforePath": "src/app.ts",
          "beforeRange": {
            "startLine": 10,
            "endLine": 12
          },
          "afterPath": "src/app.ts",
          "afterRange": {
            "startLine": 10,
            "endLine": 14
          }
        }
      ],
      "beforeFiles": [
        {
          "path": "src/app.ts",
          "content": "// previous contents"
        }
      ]
    }
  }
}

Response Notes

Returns the declarations that contain the changed lines. Each carries its kind and its span on every side that exists. Each carries a symbol key where one exists. Each is classified as added, removed, signature-changed, body-only, or unknown. An anonymous declaration carries a null name and a stable positional identity. It never carries a synthesised name. A changed line belongs to the innermost declaration containing it. The nearest externally addressable ancestor comes with it when the two differ. The whole ancestor chain never does. Totals and the classification breakdown cover the diff before paging. One call therefore carries the complete summary, and only the detail list pages. The completeness block reports what the answer left out. It names files in unsupported languages and hunks that matched no declaration. It also reports whether the workspace was fully loaded. signature-changed against body-only is API-compatibility metadata and nothing more. A body-only change cannot break a caller at compile time. It can still change behaviour, so never skip behavioural review on it. Never prune on unknown. This build takes explicit hunks rather than a git range.