Get local Git context
get_git_contextInspect 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
| Name | Required | Description | Default |
|---|---|---|---|
| files | No | Optional project-relative paths; no remote refs are accepted | |
| directory | No | Local Git repository root | . |
| compare_to | No | Local Git revision; ranges, reflogs, and remote fetches are rejected | |
| max_history | No | ||
| compare_from | No | Local Git revision; ranges, reflogs, and remote fetches are rejected | |
| include_diff | No | ||
| max_hotspots | No | ||
| include_blame | No | ||
| include_status | No | ||
| max_diff_bytes | No | ||
| redact_secrets | No | ||
| include_history | No | ||
| max_blame_lines | No | ||
| include_hotspots | No | Aggregate historical file churn from local commits | |
| max_compare_files | No | ||
| include_codeowners | No | ||
| include_changed_symbols | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| meta | Yes | ||
| error | No | ||
| message | No | ||
| success | Yes | ||
| schema_version | Yes |