Skip to main content
Glama

Repo digest (paste-ready code)

get_repo_digest
Read-onlyIdempotent

Return a GitHub repo as a paste-ready text digest at a pinned commit: directory tree plus file contents, ranked and cut to a token budget. Scope it to a folder or a bug's files before fixing.

Instructions

Return the connected GitHub repo as one paste-ready text digest at a pinned commit: a directory tree plus file contents, ranked README → manifests → entry points → source → tests and cut to a token budget (budgetTokens, default 50,000, max 200,000; counts are estimates). Scope it to a folder (path) or to one bug (reportId: the report's stack-frame files, fix files and related code first, then the files that import them). Sensitive files (.env, keys) are never included, and a file that looks like it holds a secret is replaced with a notice. Returns { sha, ref, total_tokens, budget_tokens, files: [{ path, tokens, truncated }], dropped_counts, redacted, scope, text }. Works without codebase indexing. Read-only. Use to hand yourself the code around a bug before fixing it; use get_fix_context for the diagnosis, or search_codebase to find one thing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoBranch, tag or commit SHA (default: the repo default branch)
pathNoScope to one folder, e.g. "apps/web/src"
excludeNoGlob patterns to leave out, e.g. ["tests/"]
includeNoGlob patterns a file must match, e.g. ["src/**/*.ts", "*.md"]
reportIdNoScope to one bug: the report's files come first, then the rest of the repo by priority (`report_id` is accepted too.)
projectIdNoProject UUID (defaults to configured project) (`project_id` is accepted too.)
budgetTokensNoEstimated token budget for the whole digest (default 50,000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.14

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only cover the safety profile (readOnly/idempotent/openWorld); the description goes well beyond by disclosing that .env/keys are never included, secret-looking files are replaced with a notice, token counts are estimates, ordering is README → manifests → entry points → source → tests, and it works without indexing. These are exactly the behavioral traits an agent needs before relying on the output.

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 core purpose and the return shape are front-loaded, and with no output schema the return-field enumeration earns its place. It is dense, though the first sentence runs long enough that some detail could be trimmed.

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

Completeness5/5

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

With no output schema, the description fully compensates by spelling out the returned object (sha, ref, total_tokens, files, dropped_counts, redacted, scope, text). Combined with the redaction and indexing caveats, nothing an agent needs to call this correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real semantics: budgetTokens default and max, that reportId prioritizes stack-frame files, fix files and related code then the files that import them, and the ranking/scope behavior of path. The exclude/include and projectId params get no extra narrative, keeping it below a 5.

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 and resource ('Return the connected GitHub repo as one paste-ready text digest at a pinned commit') and immediately differentiates itself from siblings by naming get_fix_context and search_codebase. The agent can tell exactly what artifact this produces without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Explicitly routes usage: 'Use to hand yourself the code around a bug before fixing it; use get_fix_context for the diagnosis, or search_codebase to find one thing.' It also gives both scoping modes (path vs reportId) with the condition that selects each, so when-to-use and alternatives are fully covered.

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