get_symbol_summary
Retrieve symbol details including type, location, and project context from TypeScript code at specific positions to enable code navigation and analysis.
Instructions
Return symbol kind, display text, declaration location, and project metadata for a 1-based source position.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| workspaceRoot | No | ||
| projectTsconfigPath | No | ||
| line | Yes | ||
| column | Yes |
Implementation Reference
- src/server.ts:139-146 (handler)The MCP tool handler for 'get_symbol_summary' which calls the cache service to retrieve the symbol and project summary.
async (args: PositionArgs) => { const { symbol, project } = cache.getSymbolSummary(args.file, args.line, args.column, args); return { content: [ { type: "text", text: JSON.stringify({ file: args.file, line: args.line, column: args.column, symbol, project }, null, 2), }, - src/server.ts:132-138 (registration)The registration of the 'get_symbol_summary' tool within the MCP server.
server.registerTool( "get_symbol_summary", { title: "Get Symbol Summary", description: "Return symbol kind, display text, declaration location, and project metadata for a 1-based source position.", inputSchema: definitionSchema, }, - src/project-service.ts:320-331 (helper)Helper method in ProjectService that bridges the tool handler call to the underlying service that performs the actual symbol lookup.
public getSymbolSummary( filePath: string, line: number, column: number, options: ProjectLookupOptions, ): { symbol: SymbolSummary | null; project: ProjectMetadata } { const service = this.getOrCreate({ ...options, file: filePath }); return { symbol: service.getSymbolSummary(filePath, line, column), project: service.getProjectMetadata(), }; }