Symbol Definition
symbol_definitionLocate the canonical declaration of any identifier. Returns the exact file, line, and code snippet for the single definitive declaration.
Instructions
Return the single best deterministic declaration site for a known identifier.
Use this tool when you need to:
Jump straight to the canonical declaration of a function, class, type, interface, or constant
Get one definitive answer (file, line, kind, snippet) rather than a ranked list
Complement symbol_search (ranked) and symbol_references (non-declaration usages)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Identifier whose declaration site you want to locate. | |
| bypass_cache | No | When true, bypass caches for this call. | |
| exclude_paths | No | Optional workspace-relative glob filters to exclude matching paths after include filtering. | |
| include_paths | No | Optional workspace-relative glob filters to include matching paths only. | |
| language_hint | No | Optional language hint (currently advisory; reserved for future use). | |
| workspacePath | No | Optional workspace path. Defaults to the current workspace. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | ||
| kind | No | ||
| line | No | ||
| found | Yes | ||
| score | No | ||
| column | No | ||
| symbol | Yes | ||
| snippet | No | ||
| diagnostics | Yes | ||
| schema_version | Yes |