Skip to main content
Glama
kvnpetit

SRC (Structured Repo Context)

by kvnpetit

Assemble task context

assemble_task_context
Read-onlyIdempotent

Assemble a bounded context dossier for a development task by merging project profile, Git changes, relevant artifacts, memory, and repository map into one AI-ready bundle.

Instructions

Prepare a bounded one-call agent dossier combining project profile, revision-aware memory, relevant artifacts, local Git changes, a PageRank-style repository map, and indexed code search. Each layer degrades independently and receives a fair share of the token budget.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYesThe development task or question to orient around
depthNoContext breadth: map/search only, normal agent dossier, or deeper evidencestandard
directoryNoProject directory.
max_tokensNoApproximate maximum size of the rendered context bundle
include_gitNo
memory_scopeNoproject
search_limitNoMaximum semantic search results
include_memoryNo
include_searchNo
include_artifactsNo
memory_min_confidenceNoIgnore low-confidence memories in the agent dossier
include_project_contextNo

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

B3.4/5.0
Behavior3/5

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

Annotations already indicate readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the agent knows this is safe and non-mutating. The description adds useful behavioral context: layers degrade independently, each gets a fair share of the token budget, and it is a bounded one-call dossier. However, it doesn't elaborate on what happens when some layers fail (e.g., partial results), or how the token budget is allocated among layers. With annotations covering safety, the description adds moderate context beyond them, justifying a 3 rather than a 2.

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 is a single, concise sentence of moderate length that front-loads the core purpose ('Prepare a bounded one-call agent dossier') and immediately enumerates the layers. It then adds the two key behavioral traits (independent degradation and fair token budget) without fluff. While it doesn't use structured lists or paragraphs, the sentence is efficient and every clause adds value. Slightly longer than ideal, but appropriate for the complexity.

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?

Given there is an output schema (not shown) and annotations cover safety, the description does not need to explain return values. However, the tool is complex (12 parameters, 6 without schema descriptions) and the description provides only high-level layer coverage. It leaves out how to use flags like include_memory, include_search, or how to balance depth with max_tokens, despite these being critical for a 'bounded' dossier. The behavior of fair token sharing is mentioned but not how it is enforced. The description is complete enough for basic understanding but lacks operational details that an agent would need to tune the tool effectively, so a 3 is appropriate.

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 only 50%, with 6 of 12 parameters lacking descriptions (include_git, include_memory, include_artifacts, include_project_context, memory_scope, and partially depth). The description only mentions 'project profile, revision-aware memory, relevant artifacts, local Git changes, a PageRank-style repository map, and indexed code search', which maps to the include_* flags and depth, but doesn't explain the syntax or semantics of memory_scope's pattern, nor the defaults and interactions. For example, the description does not clarify what 'memory_scope' does or how 'search_limit' interacts with total token budget. Given the low coverage, the description fails to compensate for the undocumented parameters, scoring below the baseline 3.

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 the tool assembles a bounded one-call agent dossier combining multiple context sources, with a specific verb ('assemble') and resource ('task context'). It distinguishes itself from siblings by emphasizing the combination of project profile, memory, artifacts, Git changes, and code search into a single bundle, whereas siblings like get_project_context or search_code are individual data sources. However, it doesn't explicitly name a sibling it is not, so differentiation is inferred rather than explicit.

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 implies usage as a one-call entry point for gathering comprehensive context before a task, contrasting with individual retrieval tools among siblings. It doesn't provide explicit when-not-to-use or alternative conditions, nor does it mention when to prefer individual tools over this aggregate. The bounded nature and fair token budget suggest efficiency, but no direct comparison is made. Heavily parameterized, the description could guide when to adjust depth or include flags, but lacks explicit routing.

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