Skip to main content
Glama

get_symbol

Read-onlyIdempotent

Retrieves the full source body of one function, class, or method from an ingested file, so you can read only the needed symbol and report its indexing age.

Instructions

Full body of ONE symbol (function/class/method) from an ingested file. Read only the piece you need. Self-heals against the local file if CM_CODE_ROOT is set; always reports the indexing age.

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": {
      "path": "<path>",
      "simbolo": "<simbolo>"
    },
    "name": "get_symbol"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
simboloYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/non-destructive, and the description adds genuinely new behavior: it self-heals against the local file when CM_CODE_ROOT is set, and it always reports indexing age so the caller can judge staleness. It stops short of saying what happens when the symbol is missing or ambiguous (multiple matches).

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?

Three short sentences, front-loaded with the scope constraint, then the efficiency rationale, then the runtime caveats. No filler, and each sentence contributes distinct information.

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

Completeness3/5

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

With no output schema the description should describe the return shape more concretely than 'full body', and it omits failure behavior for a two-required-parameter lookup tool. The CM_CODE_ROOT self-heal note and indexing-age disclosure do offset part of that gap.

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

Parameters2/5

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

Schema coverage is 0%, so the description carries the full burden for both parameters. It only loosely maps them: 'path' is an ingested file and 'simbolo' is a symbol, but nothing clarifies whether the symbol must be a fully qualified name, whether the path is absolute or repo-relative, or what happens on partial matches.

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 resource and scope: the full body of exactly ONE symbol (function/class/method) from an ingested file. The uppercase 'ONE' and 'Read only the piece you need' make it distinguishable from a search or whole-file read, though no sibling tool is named explicitly.

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

Usage Guidelines3/5

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

'Read only the piece you need' implies the use case (retrieve a full definition instead of a snippet), but the description never states when NOT to use it or points to an alternative such as search_code for locating a symbol or get_symbol_refs for callers. Guidance is implied rather than explicit.

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