Skip to main content
Glama
fejinrp
by fejinrp

read_symbol

Read-only

Retrieves source code for one symbol or line range from a file, so agents can inspect only needed code and reduce context tokens.

Instructions

Source of one symbol (e.g. "fn", "Class.method") or a line range.

Input Schema

NameRequiredDescriptionDefault
fileYes
symbolNo
endLineNo
startLineNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

C2.6/5.0
Behavior2/5

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

Annotations only declare readOnlyHint=true, so the safety profile is covered, but the description adds almost nothing beyond that. It does not say what happens if the symbol is not found, whether `symbol` overrides `startLine`/`endLine`, whether line bounds are inclusive, or how large an unbounded range response might be.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single short sentence with the key mode distinction front-loaded and no filler. However, its brevity crosses into under-specification for a 4-parameter tool, so the efficiency does not fully pay off.

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 simplicity (single-file read, no nested objects, no output schema, read-only), the description plus name plus schema is enough to attempt a call. Missing details about file targeting and mode precedence are gaps, but not blockers for a straightforward source-retrieval tool.

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 carries the full burden, yet it only clarifies `symbol` (with format examples like "Class.method") and hints at the line-range pair. It never explains `file`, whether both `startLine` and `endLine` are required together, or the precedence between the two selection modes.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description conveys the resource (source of a symbol) and names two modes (symbol name or line range), but the verb is implicit and the required `file` target is never mentioned. It does not distinguish itself from siblings like `outline` or `search`, so an agent must infer that this fetches raw source rather than a structural listing.

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

Usage Guidelines2/5

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

No when-to-use guidance and no exclusions. With siblings `outline`, `search`, and `summary_cache` all plausibly touching source, the description never says why to pick this one or when a symbol lookup should be preferred over a search.

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