inspect_symbol
Inspect a symbol to retrieve its structural neighborhood, direct callers, neighbors, and metrics so you can orient and verify changes before modifying code.
Instructions
Inspect a symbol and retrieve its structural neighborhood and metrics. Use this read-only tool as your primary orientation step before modifying a specific class, function, or module. Use this instead of query_graph when you already know the exact target ID and need its direct callers, neighbors, or a verification plan. The baseline response returns canonical node details. Use the boolean flags to append optional data blocks (for example, include_callers=true appends all incoming dependencies). Setting multiple flags to true (such as include_analysis and include_file_summary) can produce large responses; use only the flags needed for your immediate task to conserve context budget.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | Node ID or label to inspect. When include_file_summary is set, a file path or filename suffix is also accepted. | |
| group_by | No | When include_file_summary is true, group symbols by 'kind' (default) or 'community'. | |
| relation | No | Optional substring used to filter neighbors by relation type, for example 'calls' or 'imports'. | |
| show_leaves | No | When include_file_summary is true, include low-degree leaf symbols of degree 5 or less. Default false. | |
| max_neighbors | No | Maximum number of neighbors to return (default 50, minimum 1). | |
| extracted_only | No | When include_neighbors is true, show only edges with EXTRACTED confidence. Default false. | |
| include_callers | No | Append structural references to the target: containers, imports, inheritance, and implementations. Default false. | |
| include_analysis | No | Append the composite symbol analysis with behavioral and structural connections plus a confidence summary. Default false. | |
| include_neighbors | No | Append direct neighbors of the target with relation types, confidence, and scores. Default false. | |
| include_explanation | No | Append a pre-change explanation with hierarchy, community context, entry points, must-read files, and test scaffolding. Default false. | |
| include_file_summary | No | Append a summary of every symbol extracted from the target's source file. Default false. |