Skip to main content
Glama
florpan
by florpan

get_symbol_body

Get the complete source code of any named function, method, or class directly, bypassing file reads. Returns the declaration body for analysis.

Instructions

The full source of one declaration, by name — a method, class or function — without reading the file it lives in. Use this instead of opening a file to look at a single member.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesSymbol name

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It usefully discloses that the tool returns the full source of one declaration and does not require opening the containing file. It does not explain error behavior or edge cases, but for a simple read-oriented tool it gives meaningful behavioral insight.

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?

Two compact sentences, front-loaded with the core purpose, with no filler. Every word adds information, and the usage guidance is succinctly appended.

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?

Given the tool's low complexity (one required parameter) and no output schema, the description conveys the return value ('full source') and the input semantics sufficiently. It omits error conditions and resolution scope, but for this straightforward getter, the description is largely complete.

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

Parameters4/5

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

The schema already describes the 'name' parameter as 'Symbol name' with 100% coverage, so the baseline is 3. The description adds value by specifying that the name must be a method, class, or function declaration, clarifying the accepted symbol kinds and the intent that it is a declaration name, not a file path.

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?

The description clearly states the tool returns the full source of one declaration (method, class, or function) identified by name, which is a specific verb+resource. It distinguishes the tool from simply reading a file, though it does not explicitly differentiate from sibling tools like find_symbol or find_definition.

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?

The description provides explicit guidance: 'Use this instead of opening a file to look at a single member.' This gives a clear invocaton context and identifies an alternative to avoid. However, it does not address sibling tools or edge cases like when the symbol is not found.

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