Skip to main content
Glama
rohitkhamrai

Precision-MCP

by rohitkhamrai

get_symbol_slice

Retrieve exact source code for a single function, class, or method by symbol name without loading the whole file.

Instructions

Extract the exact source code block of a single function or class by symbol name without reading the surrounding file.

Input Schema

NameRequiredDescriptionDefault
file_pathYesFile path containing the symbol.
symbol_nameYesName of the function, class, or method to slice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the behavioral load. It does disclose the key behavior that only the exact symbol block is returned, not the surrounding file, which is useful. However, it omits whether the operation is read-only, how ambiguities (e.g., overloaded methods) are resolved, or what happens when the symbol is not found.

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?

A single sentence with zero waste, front-loading the action and the differentiator (exact block, no surrounding file). 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?

No output schema exists, so the description must clarify return values; it does so adequately by stating 'exact source code block'. Yet for a tool with no annotations and no output schema, it leaves gaps around error handling, ambiguity resolution, and whether the block includes line numbers or metadata. The slight mismatch between 'function or class' in the description and 'function, class, or method' in the schema also reduces completeness.

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

Parameters3/5

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

Schema description coverage is 100%, so both parameters are fully documented in the schema. The description adds only 'by symbol name' and implies file_path, but does not provide additional syntax or format guidance beyond what the schema already offers, so the baseline of 3 is appropriate.

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?

States a specific verb (extract) and resource (exact source code block of a single function or class by symbol name) and implicitly contrasts with reading the whole file. It distinguishes itself from siblings like find_symbol and get_outline by focusing on the code block itself, though it never names those alternatives explicitly.

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?

Offers no explicit when-to-use guidance or comparison to alternatives such as find_symbol, get_outline, or find_callers. The phrase 'without reading the surrounding file' hints at efficiency but leaves the agent to infer the appropriate context.

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