Skip to main content
Glama

Get Signature Help

get_signature_help

Retrieve method signature overloads and parameter information for Svelte functions to understand how to use them correctly in your code.

Instructions

Get method signature overloads and parameter info at a symbol position.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesAbsolute path to the file
symbolNameYesName of the symbol (method/function call) to get signatures for
symbolKindNoKind of symbol

Implementation Reference

  • Tool 'get_signature_help' is registered and implemented in this block, using LSP 'textDocument/signatureHelp' to retrieve and format method signatures.
    server.registerTool(
      "get_signature_help",
      {
        title: "Get Signature Help",
        description:
          "Get method signature overloads and parameter info at a symbol position.",
        inputSchema: z.object({
          filePath: z.string().describe("Absolute path to the file"),
          symbolName: z
            .string()
            .describe(
              "Name of the symbol (method/function call) to get signatures for"
            ),
          symbolKind: z.string().optional().describe("Kind of symbol"),
        }),
      },
      async ({ filePath, symbolName, symbolKind }): 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/signatureHelp",
            makePositionParams(prep.ctx)
          );
    
          if (!result)
            return textResult(
              `No signature help available for '${symbolName}'.`
            );
    
          const signatures = result.signatures;
          if (!Array.isArray(signatures) || signatures.length === 0) {
            return textResult(`No signatures found for '${symbolName}'.`);
          }
    
          const activeSignature = result.activeSignature ?? 0;
          const activeParam = result.activeParameter ?? 0;
    
          const lines: string[] = [
            `Signature(s) for '${symbolName}' (${signatures.length} overload(s)):`,
            "",
          ];
    
          for (let i = 0; i < signatures.length; i++) {
            const sig = signatures[i];
            const label = sig.label ?? "?";
            const isActive = i === activeSignature;
            const sigActiveParam = sig.activeParameter ?? activeParam;
    
            lines.push(`${isActive ? "  >> " : "     "}${label}`);
    
            // Documentation
            const doc = extractMarkupContent(sig.documentation);
            if (doc) lines.push(`     ${doc}`);
    
            // Parameters
            if (Array.isArray(sig.parameters) && sig.parameters.length > 0) {
              for (let p = 0; p < sig.parameters.length; p++) {
                const param = sig.parameters[p];
                let paramLabel: string;
                if (Array.isArray(param.label)) {
                  paramLabel = label.substring(param.label[0], param.label[1]);
                } else {
                  paramLabel = param.label ?? "?";
                }
                const paramDoc = extractMarkupContent(param.documentation);
                const marker =
                  isActive && p === sigActiveParam ? "*" : " ";
    
                let entry = `     ${marker} ${paramLabel}`;
                if (paramDoc) entry += ` - ${paramDoc}`;
                lines.push(entry);
              }
            }
    
            if (i < signatures.length - 1) lines.push("");
          }
    
          return textResult(lines.join("\n"));
        } 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 states what the tool does but does not describe how it behaves: e.g., whether it requires specific permissions, what happens if the symbol is not found, if there are rate limits, or what the output format looks like. For a tool with no annotations, this is inadequate, as it leaves key behavioral traits unspecified.

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: 'Get method signature overloads and parameter info at a symbol position.' It is front-loaded with the core purpose, has zero waste, and is appropriately sized for the tool's complexity. Every word earns its place, making it easy to parse quickly.

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 tool's complexity (3 parameters, no output schema, no annotations), the description is incomplete. It lacks details on behavioral traits, usage context, and output expectations. While the schema covers parameters well, the description does not compensate for the absence of annotations or output schema, leaving gaps that could hinder an AI agent's ability to invoke the tool correctly in practice.

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?

The description does not add any meaning beyond what the input schema provides. The schema has 100% description coverage, with clear descriptions for each parameter (e.g., 'Absolute path to the file', 'Name of the symbol'). The description mentions 'symbol position' but does not elaborate on parameters like 'symbolKind'. Since schema coverage is high, the baseline score of 3 is appropriate, as the schema does the heavy lifting without additional value from the description.

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: 'Get method signature overloads and parameter info at a symbol position.' It specifies the verb ('Get'), resource ('method signature overloads and parameter info'), and context ('at a symbol position'). However, it does not explicitly differentiate from siblings like 'get_hover' or 'get_completion', which might provide related but different information, so it misses the highest score.

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. It does not mention any prerequisites, exclusions, or specific scenarios for usage. Given the sibling tools include similar code analysis tools (e.g., 'get_hover', 'find_definition'), the lack of differentiation is a significant gap in helping an AI agent choose appropriately.

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