Skip to main content
Glama
kvnpetit

SRC (Structured Repo Context)

by kvnpetit

Get repository map

get_repository_map
Read-onlyIdempotent

Generate a focused repository map prioritizing key files and symbols via import-graph centrality, enabling agents to orient before reading source.

Instructions

Build a bounded, task-focusable repository map of important files and symbols. Ranking uses import-graph centrality plus optional path/symbol focus, so an agent can orient itself before reading source.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
focusNoOptional paths or symbols to prioritize
directoryNoProject directory.
max_filesNoMaximum files to inspect
max_tokensNoApproximate maximum size of the textual map
redact_secretsNoRedact common secrets in the rendered map (default: true)

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 declare readOnlyHint, idempotentHint, and destructiveHint false, covering safety. The description adds behavioral context about ranking (import-graph centrality, optional focus) and the bounded nature (max files/tokens). This goes beyond the annotations and helps the agent understand what the tool does internally. 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 with no fluff. The main purpose is front-loaded, and the ranking method and usage context are provided in the second sentence. Every part is useful and directly relevant.

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?

The description explains the purpose, ranking mechanism, and usage context. Since an output schema exists, it does not need to explain return values. It covers the essential behavior an agent needs to decide when to use it, and the bounded nature is mentioned. Minor gaps like the exact format of the map are covered by the output schema.

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 coverage is 100%, with each parameter having a description. The description mentions 'path/symbol focus' which maps to the focus parameter, but it does not add substantial detail beyond the schema. Baseline 3 is appropriate since the schema already handles parameter documentation and the description adds marginal value.

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 clearly states it builds a repository map of important files and symbols, with a specific verb ('build') and resource. It distinguishes itself from siblings by mentioning 'task-focusable' and ranking via centrality/focus, which sets it apart from list_symbols or get_dependency_graph. However, it does not explicitly name an alternative, 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 Guidelines4/5

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

The description gives a clear usage context: 'so an agent can orient itself before reading source.' This implies when to use the tool (as a preliminary step) and its purpose. It does not explicitly mention when not to use it or name alternatives, but the context is sufficient for an agent to infer appropriate usage.

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