Skip to main content
Glama

describe_symbol

Retrieve comprehensive details about a function or class: signature, parameters, callers, callees, and related domain concepts – without reading its source file. Ideal for understanding what a symbol does and its role in the codebase.

Instructions

Describe a function or class WITHOUT reading its source file — returns signature, parameters, callers, callees, and related domain concepts. Faster and more informative than Read for understanding what a symbol does and how it fits into the codebase. Use when asked 'what does function X do' or 'what is class X'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesFunction or class name (e.g. 'spatial_transform')

Implementation Reference

  • Schema definition for the 'describe_symbol' tool — defines the 'name' parameter (function or class name) and sets the MCP name, label, description, and prompt snippet.
    {
      mcpName: "describe_symbol",
      label: "Describe Symbol",
      description:
        "Describe a function or class without reading its source — returns " +
        "signature, parameters, callers, callees, semantic role.",
      promptSnippet:
        "ontomics_describe_symbol: function/class info without reading source",
      parameters: Type.Object({
        name: Type.String({
          description: "Function or class name (e.g. 'spatial_transform')",
        }),
      }),
    },
  • Registration loop iterates over all tool defs and calls pi.registerTool for each, including 'describe_symbol'. The execute method calls the remote MCP server's 'describe_symbol' tool via the McpClient wrapper.
    for (const def of toolDefs()) {
      pi.registerTool({
        name: `ontomics_${def.mcpName}`,
        label: def.label,
        description: def.description,
        promptSnippet: def.promptSnippet,
        promptGuidelines: [
          "Use ontomics tools BEFORE grep/glob for semantic codebase questions.",
        ],
        parameters: def.parameters,
        async execute(_toolCallId, params, _signal, onUpdate, _ctx) {
          onUpdate?.({
            content: [{ type: "text", text: `Querying ontomics: ${def.mcpName}...` }],
          });
          try {
            const mcp = await getClient();
            const text = await mcp.callTool(def.mcpName, cleanArgs(params));
            return { content: [{ type: "text", text }] };
          } catch (err) {
            throw new Error(
              `ontomics ${def.mcpName} failed: ${err instanceof Error ? err.message : String(err)}`,
            );
          }
        },
      });
    }
  • The actual handler for 'describe_symbol' — an async execute function that forwards the call to the remote ontomics MCP server via McpClient.callTool('describe_symbol', params). Actual business logic lives in the external ontomics binary.
    async execute(_toolCallId, params, _signal, onUpdate, _ctx) {
      onUpdate?.({
        content: [{ type: "text", text: `Querying ontomics: ${def.mcpName}...` }],
      });
      try {
        const mcp = await getClient();
        const text = await mcp.callTool(def.mcpName, cleanArgs(params));
        return { content: [{ type: "text", text }] };
      } catch (err) {
        throw new Error(
          `ontomics ${def.mcpName} failed: ${err instanceof Error ? err.message : String(err)}`,
        );
      }
    },
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses that it returns signature, parameters, callers, callees, and domain concepts without reading source. No destructive hints, but could mention if it has any side effects or requires permissions.

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?

Two sentences, each adding value: first defines action and output, second gives usage pattern and comparison. No redundant words.

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

Completeness5/5

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

For a single-parameter tool with no output schema, the description thoroughly covers what it does, when to use it, and what it returns. Sibling tools are distinct.

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 coverage is 100%, so baseline is 3. The description adds no extra parameter info beyond the schema's 'Function or class name' description.

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

Purpose5/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: 'Describe a function or class WITHOUT reading its source file' and lists return values. It distinguishes from siblings like 'Read' by emphasizing it is faster and more informative.

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

Usage Guidelines5/5

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

Explicit usage guidance: 'Use when asked what does function X do or what is class X.' Also contrasts with alternative (Read) to guide selection.

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/EtienneChollet/ontomics'

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