Skip to main content
Glama

describe_symbol

Read-onlyIdempotent

Inspect a symbol's definition, callers, callees, and tests in one call before editing; for classes, view bases, subtypes, and member signatures instead of the full body.

Instructions

One call to understand a symbol before changing it: its code, callers, callees and tests; for a class, its bases, subtypes and member signatures instead of the body. No read_file needed after. Calls and types need the graph layer; definition and tests always work.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "symbol": "<symbol>"
    },
    "name": "describe_symbol"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoPath fragment, to pick one of several definitions.
sourceNoSource name. Omit when only one source applies.
symbolYesIdentifier, e.g. `MyClass` or `MyClass.handleClick`.
tests_limitNoMax tests.
callees_limitNoMax callees.
callers_limitNoMax callers.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.12.0
    • addedInput schema / properties / file
      Added value: +{
      +  "description": "Path fragment, to pick one of several definitions.",
      +  "type": "string"
      +}
    • removedInput schema / properties / source / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / source / default
      Removed value: -null
    • addedInput schema / properties / source / type
      Added value: +"string"
  2. Addedv1.9.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already supply readOnly, idempotent, non-destructive and closed-world hints, so the safety profile is covered. The description adds genuinely non-obvious context — graceful degradation when the graph layer is unavailable, and that a follow-up read_file is unnecessary — but says nothing about ambiguous symbol matches or the shape of the returned payload, which matters since no output schema exists.

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

Conciseness4/5

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

Two dense sentences, front-loaded with the payoff ('One call to understand a symbol') before the facet enumeration and the graph-layer caveat. Nothing is redundant, though the semicolon-chained facet list is tight enough to require a second read.

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

Completeness4/5

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

For a 6-parameter read tool with no output schema, the description covers what facets come back and the availability caveat, which is enough to call it correctly. It leaves the response shape unstated, but the limit parameters in the schema signal truncation behavior adequately.

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 all six parameters carry their own descriptions and the baseline is 3. The description adds no meaning beyond the schema — the 'MyClass.handleClick' qualification it implies is already spelled out in the symbol parameter's own 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?

Names a specific verb and resource ('describe_symbol' → one call to understand a symbol) and enumerates the returned facets: code, callers, callees, tests, plus class-specific bases/subtypes/member signatures. The phrase 'One call' implicitly contrasts with per-facet siblings like find_definition and find_usages, but no sibling is named explicitly, so the differentiation stays inferential.

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

Usage Guidelines4/5

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

Gives a clear situational trigger ('before changing it') and a prerequisite caveat: callers/types require the graph layer while definition and tests always work. It stops short of stating when to prefer the narrower siblings (e.g. find_tests_for) over this aggregate call.

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