Skip to main content
Glama
kvnpetit

SRC (Structured Repo Context)

by kvnpetit

Get symbol at position

get_symbol_at_position
Read-onlyIdempotent

Resolve the smallest code symbol at a given line and column, returning byte-precise ranges and a source excerpt for focused code navigation.

Instructions

Resolve the smallest Tree-sitter symbol containing an exact 1-based line and 0-based column. Returns byte-precise ranges and a bounded source body for efficient code navigation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lineYes1-based source line
columnYes0-based character column
directoryNoProject directory.
file_pathYesSource file path relative to directory
include_sourceNoInclude a bounded exact symbol body when found
redact_secretsNoRedact common secrets in returned source (default: true)
max_source_bytesNoMaximum source bytes returned for the symbol

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
metaYes
errorNo
messageNo
successYes
schema_versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive safety, so the bar is lower. The description adds genuinely useful behavior beyond annotations: resolution selects the smallest containing symbol, returns byte-precise ranges, and bounds the source body. No contradiction with annotations.

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 of about 28 words, front-loaded with the core operation before the return-format detail. Every clause earns its place and nothing redundantly repeats the schema.

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?

With a full output schema, complete parameter coverage, and annotations carrying the safety profile, the description covers the essential contract: coordinate convention, resolution granularity, and output bounding. Minor gaps remain around error behavior when no symbol is found, but nothing an agent needs for a typical correct call is missing.

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 the baseline is 3. The description adds modest cross-parameter meaning by tying 'bounded source body' to include_source/max_source_bytes and reinforcing the 1-based/0-based coordinate conventions, but adds no format or syntax details beyond the 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?

States a specific verb ('Resolve') and a specific resource ('the smallest Tree-sitter symbol') with exact coordinate semantics ('exact 1-based line and 0-based column'). This distinguishes it from name-based siblings like find_symbols and query-based search_code without needing to open schemas.

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 phrase 'for efficient code navigation' plus the exact-coordinate framing implies position-based lookup, but no alternative tools are named and there is no when-not-to-use guidance. With close siblings like semantic_navigation, get_code_snippet, and parse_ast available, the agent must infer the selection criteria.

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