Skip to main content
Glama
c0sc0s
by c0sc0s

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
NameRequiredDescriptionDefault
fileYes
workspaceRootNo
projectTsconfigPathNo
lineYes
columnYes

Implementation Reference

  • 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,
      },
  • 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(),
      };
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/c0sc0s/agent-workspace-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server