Skip to main content
Glama

get_symbol

Read-only

Retrieves verified, line-numbered source for one symbol when another response supplies its ID, with continuation IDs for truncated results.

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 as symbol_id.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_symbol"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoAlias for symbol_id.
repoNoUsually omitted.
depthNo1 is this symbol alone; 2-3 also return the bodies it calls, transitively, in `callee_bodies`.
queryNoRegex or substring filter on an omission ref's lines.
symbol_idNo"path/to/file.py::Name", "path/to/file.py:140-180" for a live range, or an omission ref.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changedv0.62.0
    • removedInput schema / properties / context_lines
      Removed value: -{
      -  "default": 0,
      -  "type": "integer"
      -}
    • addedInput schema / properties / depth / description
      Added value: +"1 is this symbol alone; 2-3 also return the bodies it calls, transitively, in `callee_bodies`."
    • removedInput schema / properties / id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / id / description
      Added value: +"Alias for symbol_id."
    • addedInput schema / properties / id / type
      Added value: +"string"
    • removedInput schema / properties / query / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / query / description
      Added value: +"Regex or substring filter on an omission ref's lines."
    • addedInput schema / properties / query / type
      Added value: +"string"
    • removedInput schema / properties / reference
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ]
      -}
    • removedInput schema / properties / repo / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / repo / description
      Added value: +"Usually omitted."
    • addedInput schema / properties / repo / type
      Added value: +"string"
    • removedInput schema / properties / symbol_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / symbol_id / description
      Added value: +"\"path/to/file.py::Name\", \"path/to/file.py:140-180\" for a live range, or an omission ref."
    • addedInput schema / properties / symbol_id / type
      Added value: +"string"
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "additionalProperties": true,
      -      "title": "Result",
      -      "type": "object"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "get_symbolOutput",
      -  "type": "object"
      -}New value: +null
  2. 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"
  3. Changed1 schema field changedv0.48.0
    • addedInput schema / properties / reference
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Reference"
      +}
  4. Changed1 schema field changedv0.41.0
    • addedInput schema / properties / depth
      Added value: +{
      +  "default": 1,
      +  "title": "Depth",
      +  "type": "integer"
      +}
  5. 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"
      -]
  6. First observedv0.1.0

TDQS

A4.4/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, so the safety profile is covered structurally. The description still adds real behavior beyond that: results are 'verified, line-numbered source' and truncated results carry a `continuation` that must be passed back as symbol_id, which an agent could not infer from the annotations.

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?

Front-loaded with the one-line purpose, then exclusions, then return behavior. Every sentence carries distinct information (routing, anti-pattern, return format, continuation) with no restatement of the name.

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?

No output schema exists, but the description covers the return value shape and the truncation/continuation mechanic, which is the main thing an agent needs. Minor gap: the schema marks zero required parameters while the description implies an id is mandatory, and the `depth` recursion option that materially changes results is not mentioned.

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 the schema already documents id/symbol_id, repo, depth, and query with examples. The description reinforces symbol_id provenance and the continuation round-trip but does not explain depth or query semantics; the 100%-coverage baseline of 3 applies.

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?

Specific verb+resource: 'Follow-up read of one symbol whose id another response already gave you.' It is explicitly scoped as a follow-up read rather than a discovery tool, which separates it from get_answer, get_context, and search_codebase.

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?

Gives explicit when-to-use routing: 'Not an entry point,' get_answer ships symbol_bodies, whole-file reads go through get_context(include=["skeleton"]) or a Read. It also names the anti-pattern to avoid ('Never walk a file symbol by symbol'), which is stronger than most definitions provide.

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