Skip to main content
Glama
Phyzx72
by Phyzx72

get_symbol_source

Retrieve the exact source code of a symbol by its ID or name, optionally filtered by file, returning only the precise byte range from disk to minimize data transfer.

Instructions

Fetch a symbol's exact source by id, or by name (+optional file).

Returns the precise byte range from disk (no whole-file read), so an agent gets only the function/class body it needs. Provide symbol_id OR name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNo
nameNo
symbol_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/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. It discloses the efficient byte-range read (no whole-file read), which is a positive behavioral trait. However, it does not mention error handling (e.g., symbol not found), behavior when both id and name are provided, or any prerequisites like an index. These gaps are notable for a tool with zero annotation support.

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 sentences with no waste. The primary purpose is front-loaded, followed by a key behavioral detail and a clear usage instruction. Every word earns its place.

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 description covers the return type (byte range) and parameter selection, but omits error scenarios, precedence rules when both id and name are given, and any dependency on an index (given siblings like index_folder). It is adequate for straightforward calls but not fully 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 has 0% coverage, so the description must clarify parameter meaning. It explicitly explains that symbol_id and name are alternative identifiers, and file is optional for name-based lookup. This adds the crucial OR relationship and the role of file, going beyond the bare schema.

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 states a specific verb ('fetch') and resource ('symbol's exact source'), and distinguishes itself from siblings by emphasizing the precise byte range and that it returns only the needed body. This clearly separates it from tools like get_file_outline or search_symbols.

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?

Usage is implied through the description's purpose and the note 'Provide symbol_id OR name', but it does not explicitly mention when to prefer this over siblings or any exclusions. The benefit statement ('so an agent gets only the function/class body it needs') gives context but no direct comparison.

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