Skip to main content
Glama

Go to Implementation

go_to_implementation

Find implementations of interfaces or abstract methods in Svelte projects to navigate code structure and understand component relationships.

Instructions

Find implementations of an interface or abstract method.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesAbsolute path to the file
symbolNameYesName of the symbol to find
symbolKindNoKind of symbol
filterNoOptional regex filter on symbol/file names in results
limitNoMax results to return. Default: 50

Implementation Reference

  • The "go_to_implementation" tool is registered and implemented in src/tools/navigation.ts. It uses the `prepareSymbolRequest` helper to find the context, then requests `textDocument/implementation` from the LSP, and finally formats the results using `formatLocations`.
    server.registerTool(
      "go_to_implementation",
      {
        title: "Go to Implementation",
        description:
          "Find implementations of an interface or abstract method.",
        inputSchema: z.object({
          filePath: z.string().describe("Absolute path to the file"),
          symbolName: z.string().describe("Name of the symbol to find"),
          symbolKind: z.string().optional().describe("Kind of symbol"),
          filter: z
            .string()
            .optional()
            .describe("Optional regex filter on symbol/file names in results"),
          limit: z
            .number()
            .default(50)
            .describe("Max results to return. Default: 50"),
        }),
      },
      async ({
        filePath,
        symbolName,
        symbolKind,
        filter,
        limit,
      }): Promise<ToolResult> => {
        try {
          const prep = await prepareSymbolRequest(lsp, filePath, symbolName, symbolKind);
          if ("error" in prep) return textResult(prep.error);
    
          const result = await lsp.request(
            "textDocument/implementation",
            makePositionParams(prep.ctx)
          );
          return textResult(formatLocations(result, "implementation", filter, limit));
        } catch (ex) {
          return textResult(formatError(ex));
        }
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions what the tool does but lacks details on permissions, rate limits, error handling, or output format. For a tool with 5 parameters and no output schema, this leaves significant gaps in understanding how it behaves in practice.

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?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and wastes no space, making it easy to parse quickly for an AI agent.

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

Completeness2/5

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

Given the complexity of a code navigation tool with 5 parameters, no annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like what the output looks like, error conditions, or how it integrates with sibling tools, leaving the agent with insufficient context for effective use.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema fully documents all parameters. The description doesn't add any semantic details beyond what's in the schema, such as examples or constraints on 'symbolKind'. This meets the baseline for high schema coverage but doesn't enhance parameter understanding.

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?

The description clearly states the tool's purpose with a specific verb ('Find') and resource ('implementations of an interface or abstract method'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'find_definition' or 'find_references', which might have overlapping functionality for navigating code structures.

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?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'find_definition', 'find_references', and 'go_to_type_definition', there's no indication of the specific context or scenarios where 'go_to_implementation' is preferred, leaving the agent to infer usage based on the name alone.

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/adainrivers/SvelteLS.MCP'

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