Skip to main content
Glama
tgt-technology

code-index-pg

get_symbol_body

Retrieve a symbol's signature, docstring, and location to analyze code structure and usage.

Instructions

Get the signature, docstring and location of a symbol.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It indicates a read-only lookup and names the returned information, but it does not explain behavior for missing symbols, symbol format requirements, or any prerequisites such as an indexed project.

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?

The description is a single, short sentence that is front-loaded with the verb and no filler. Every word earns its place, and it is appropriately sized for a simple one-parameter tool.

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?

The tool is simple and has an output schema, which reduces the need to describe return values. Still, the description lacks guidance on symbol naming and when to prefer this over search-oriented siblings. It is minimally viable but has clear gaps.

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 description coverage is 0%, so the description must compensate. It tells the agent that 'symbol' is the target of the lookup, but it does not specify the expected format (e.g., fully qualified name, simple name, language) or provide examples. This is only minimal compensation for an undocumented parameter.

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 uses a specific verb ('Get') and names a concrete resource ('a symbol') along with what is returned ('signature, docstring and location'). This clearly distinguishes it from siblings like search_code or get_file_summary, which serve different lookup purposes.

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?

The description implies when to use the tool: when you need a symbol's signature, docstring, or location. However, it does not explicitly state exclusions or contrast with alternatives like search_code/search_semantic, so the usage context is only implicit.

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