Skip to main content
Glama

get_symbol

Read-only

Reads one symbol by ID from prior results and returns verified, line-numbered source, with optional callee bodies, context lines, and continuation tokens for truncated output.

Instructions

Follow-up read of one symbol whose id another response already gave you.

**Not an entry point.** ``get_answer`` ships ``symbol_bodies``; for a
whole file ``get_context(include=["skeleton"])`` or a Read is one call.
Never walk a file symbol by symbol. Returns verified, line-numbered
source; a truncated result carries the ``continuation`` to pass back.

Args:
    symbol_id: "path/to/file.py::Name", "path/to/file.py:140-180" for a
        live range, or an omission ref. A bare file path is not an id.
    depth: 1 (default) is this symbol alone; 2-3 also returns the bodies
        it calls, transitively, in ``callee_bodies``.
    context_lines: extra lines before/after (0-50).
    query: regex/substring filter on an omission ref's lines.
    id, reference: aliases for ``symbol_id``.
    repo: usually omitted.

Input Schema

NameRequiredDescriptionDefault
idNo
repoNo
depthNo
queryNo
referenceNo
symbol_idNo
context_linesNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changedv0.60.1
    • removedInput schema / properties / context_lines / title
      Removed value: -"Context Lines"
    • removedInput schema / properties / depth / title
      Removed value: -"Depth"
    • removedInput schema / properties / id / default
      Removed value: -null
    • removedInput schema / properties / id / title
      Removed value: -"Id"
    • removedInput schema / properties / query / default
      Removed value: -null
    • removedInput schema / properties / query / title
      Removed value: -"Query"
    • removedInput schema / properties / reference / default
      Removed value: -null
    • removedInput schema / properties / reference / title
      Removed value: -"Reference"
    • removedInput schema / properties / repo / default
      Removed value: -null
    • removedInput schema / properties / repo / title
      Removed value: -"Repo"
    • removedInput schema / properties / symbol_id / default
      Removed value: -null
    • removedInput schema / properties / symbol_id / title
      Removed value: -"Symbol Id"
    • removedInput schema / title
      Removed value: -"get_symbolArguments"
  2. Changed1 schema field changedv0.48.0
    • addedInput schema / properties / reference
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Reference"
      +}
  3. Changed1 schema field changedv0.41.0
    • addedInput schema / properties / depth
      Added value: +{
      +  "default": 1,
      +  "title": "Depth",
      +  "type": "integer"
      +}
  4. Changed5 schema fields changedv0.31.0
    • addedInput schema / properties / id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Id"
      +}
    • addedInput schema / properties / symbol_id / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / symbol_id / default
      Added value: +null
    • removedInput schema / properties / symbol_id / type
      Removed value: -"string"
    • removedInput schema / required
      Removed value: -[
      -  "symbol_id"
      -]
  5. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, but the description still adds real behavior: results are "verified, line-numbered source" and a truncated result carries a continuation to pass back. That truncation/continuation contract is not derivable from annotations. It stops short of the full picture (e.g. what happens when the id is stale or ambiguous), so not a 5.

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?

Front-loaded and well organized: the core statement comes first, routing second, then an Args block, which is easy to scan. Minor overhead from backtick-heavy markup and the "Args:" label on a description that is already structured, but every sentence carries information.

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 7-parameter read tool with an output schema and safety annotations, everything an agent needs to call it correctly is present: purpose, routing, id format, depth semantics, and truncation handling. Return-value detail is correctly left to the output schema rather than duplicated.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden and does: it gives accepted symbol_id formats (path::Name, path:140-180 range, omission ref), rules out bare file paths, explains depth=1 vs 2-3 returning transitive callee_bodies, bounds context_lines to 0-50, describes query as a regex/substring filter on omission refs, and flags id/reference as aliases and repo as usually omitted.

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 first line states a specific verb and resource ("Follow-up read of one symbol") and pins the input to an id obtained elsewhere. It explicitly contrasts itself with get_answer and get_context, so an agent can distinguish it from siblings without opening any schema.

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?

Strongest part of the definition: "Not an entry point" plus concrete routing to get_answer (for symbol_bodies), get_context with include=["skeleton"], or a plain Read, and an explicit anti-pattern ("Never walk a file symbol by symbol"). That is when-to-use, when-not-to-use, and named alternatives all at once.

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