Get one symbol implementation
ast_get_symbol_sourceRetrieve a single declaration or implementation from a TypeScript or JavaScript project, returning its project-relative location instead of the full file. Specify a symbol path to pinpoint the exact code you need.
Instructions
Returns exactly one declaration or implementation with its project-relative location, not the complete file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Project-relative or absolute source file path. | |
| symbol_path | Yes | Symbol path such as "formatDate" or "UserService.create". | |
| project_root | Yes | Absolute project directory containing tsconfig.json, or the config path. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| text | Yes | ||
| endLine | Yes | ||
| startLine | Yes |