Skip to main content
Glama
kvnpetit

SRC (Structured Repo Context)

by kvnpetit

Semantic navigation

semantic_navigation
Read-onlyIdempotent

Find code definitions, references, implementations, and diagnostics by using language servers or SCIP data, with automatic Tree-sitter fallback.

Instructions

Navigate local code with an imported SCIP catalog or allow-listed local language server when available, using definitions, references, implementations, hover, type hierarchies, and diagnostics; otherwise fall back explicitly to bounded Tree-sitter analysis with confidence and coverage metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lineYes1-based source line
columnYes0-based character column
backendNoUse a local language server, Tree-sitter fallback, or autoauto
directoryNoProject directory.
file_pathYesSource file path relative to directory
max_filesNoMaximum files used by the Tree-sitter fallback
operationYesSemantic navigation operation to perform
timeout_msNoLocal LSP request timeout
max_resultsNoMaximum locations returned
include_sourceNoInclude bounded source snippets
redact_secretsNoRedact common secrets in returned source and hover text
max_source_bytesNoMaximum source bytes per location or hover result

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

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and no destructive side effects, so the burden is lower. The description adds meaningful behavioral context: it uses a SCIP catalog or allow-listed LSP when available, otherwise falls back to a bounded Tree-sitter analysis that returns confidence and coverage metadata. This explains behavior beyond what the annotations contain, with no contradiction.

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

Conciseness4/5

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

The description packs multiple facts into one well-organized sentence, front-loading the main action ('Navigate local code') and then the backend strategy and operations. It is dense but efficient, though the long enumeration and the possible alternative string could be split for readability.

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 complexity of 12 parameters, six operations, and multi-backend behavior, the description provides a useful operational overview and explicitly covers fallback behavior and metadata. The output schema exists, so return formats needn't be spelled out. It omits explicit preconditions like importing a SCIP index or enabling an LSP, but this is handled by sibling tools and can be inferred.

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 does add some semantic context about backend selection (auto/lsp/scip/treesitter) and the meaning of bounded Tree-sitter analysis (confidence/coverage metadata), but it does little to clarify individual parameters like line, column, max_results, or max_source_bytes.

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 states a specific verb ('Navigate'), a resource ('local code'), and enumerates the exact operations (definitions, references, implementations, hover, type hierarchies, diagnostics). It also clarifies the backend model. However, it doesn't explicitly distinguish itself from overlapping siblings such as get_diagnostics or get_symbol_at_position, so it falls just short of a 5.

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 description implies the use case: semantic navigation over local code, with backend selection and fallback behavior ('when available', 'otherwise fall back explicitly'). However, it gives no explicit direction on when to choose this tool over alternative siblings (e.g., search_code, parse_ast, get_symbol_at_position), and no when-not-to-use guidance.

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