Skip to main content
Glama
kvnpetit

SRC (Structured Repo Context)

by kvnpetit

Get local Git context

get_git_context
Read-onlyIdempotent

Inspect local Git status, diffs, history, and changed code to give AI models safe repository context using only fixed local commands, avoiding scripts and remote fetches.

Instructions

Inspect bounded local Git status, diff, history, optional churn hotspots, local revision comparisons, blame, CODEOWNERS, and changed-symbol analysis. It uses only fixed non-remote Git commands, rejects arbitrary command arguments, and never executes project scripts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesNoOptional project-relative paths; no remote refs are accepted
directoryNoLocal Git repository root.
compare_toNoLocal Git revision; ranges, reflogs, and remote fetches are rejected
max_historyNo
compare_fromNoLocal Git revision; ranges, reflogs, and remote fetches are rejected
include_diffNo
max_hotspotsNo
include_blameNo
include_statusNo
max_diff_bytesNo
redact_secretsNo
include_historyNo
max_blame_linesNo
include_hotspotsNoAggregate historical file churn from local commits
max_compare_filesNo
include_codeownersNo
include_changed_symbolsNo

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
Behavior4/5

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

The description adds valuable constraints beyond the annotations: it states the tool uses only fixed non-remote Git commands, rejects arbitrary command arguments, and never executes project scripts. This is safety-relevant behavior not present in the readOnly/idempotent/non-destructive annotations, and it does not contradict them.

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 concise sentences front-load the purpose and then state key constraints. No filler; every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 17 parameters and no required ones, the description is too sparse. It doesn't explain parameter semantics for most parameters, doesn't mention when to use this over sibling tools, and doesn't provide usage examples or behavior beyond basic safety. The presence of an output schema covers return values, but the overall description is insufficient for an agent to use it effectively.

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 low (29%), with only 3 of 17 parameters having descriptions. The description lists several capabilities (hotspots, comparisons, blame, CODEOWNERS, changed symbols) that map to parameters, providing some semantic context, but it does not explain the many numeric parameters (max_history, max_diff_bytes, etc.) or their defaults. It partially compensates for the schema gaps but not fully.

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's purpose with the verb 'inspect' and lists the specific local Git context it provides (status, diff, history, hotspots, comparisons, blame, CODEOWNERS, changed symbols). It emphasizes 'bounded local' and 'non-remote', which helps distinguish it from remote Git operations, though it does not explicitly name sibling tools.

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?

No guidance is provided on when to use this tool versus the many sibling tools (get_changed_symbols, get_repository_map, etc.). The description mentions safety constraints but not usage context or alternatives, leaving the agent to infer when this tool is appropriate.

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