Skip to main content
Glama
c0sc0s
by c0sc0s

Get Symbol Summary

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(),
      };
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses the 1-based indexing behavior for line/column which is crucial for correct invocation. With no annotations provided, the description carries the full burden but omits error handling (invalid positions), side effects (caching), and output format details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single 18-word sentence efficiently packs return value types, resource target, and coordinate system constraint. No redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Compensates somewhat for missing output schema by enumerating return fields. However, with 5 parameters and 0% schema coverage, the failure to document file path format and optional configuration parameters leaves significant gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, requiring the description to compensate. It only covers line/column semantics via '1-based source position', leaving 3 parameters (file, workspaceRoot, projectTsconfigPath) completely undocumented regarding their format, requirements, and relationships.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States specific return values (symbol kind, display text, declaration location, project metadata) and the target (1-based source position). Implicitly distinguishes from get_definition by emphasizing summary-level data rather than full definition content.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides the critical constraint that positions are 1-based, but offers no guidance on when to use this versus sibling tools like get_definition or get_references, nor when the optional workspaceRoot and projectTsconfigPath parameters are required.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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