Repo digest (paste-ready code)
get_repo_digestReturn 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
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch, tag or commit SHA (default: the repo default branch) | |
| path | No | Scope to one folder, e.g. "apps/web/src" | |
| exclude | No | Glob patterns to leave out, e.g. ["tests/"] | |
| include | No | Glob patterns a file must match, e.g. ["src/**/*.ts", "*.md"] | |
| reportId | No | Scope to one bug: the report's files come first, then the rest of the repo by priority (`report_id` is accepted too.) | |
| projectId | No | Project UUID (defaults to configured project) (`project_id` is accepted too.) | |
| budgetTokens | No | Estimated token budget for the whole digest (default 50,000) |