Review
reviewGenerate token-efficient review context for code changes. Provides structural summary, impacted nodes, source snippets, and review guidance for git diffs, or delta comparison between commits.
Instructions
Generate token-efficient review context for code changes. Actions: context (default — auto-detects changed files from git diff, returns structural summary, impacted nodes, source snippets, and review guidance), delta (from_sha, to_sha — wraps the query.diff buckets and, when show_line_shifts=true, surfaces qualified_names whose line_start moved between the two commits for refactor auditing). Context params: changed_files (auto), max_depth=2, include_source=true, max_lines_per_file=200, base='HEAD~1', repo_root (auto). Delta params: from_sha, to_sha, show_line_shifts=false, repo, repo_root. Use help tool for full docs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | ``context`` action — git ref for change detection (default: ``HEAD~1``). | HEAD~1 |
| repo | No | Phase 2 Task 10 — when non-empty, scope to nodes whose ``repo_id`` matches (e.g. ``repo='repo_a-aaaaaaaa'``). Default ``""`` includes every federated repo. Both actions. | |
| action | No | ``context`` (default) or ``delta``. | context |
| to_sha | No | ``delta`` action — later commit SHA. Required. | |
| from_sha | No | ``delta`` action — earlier commit SHA. Required. | |
| languages | No | ``context`` action — optional list of language names (e.g. ``["python"]``) to scope the ``untested_functions`` list. Excludes functions whose language doesn't match. Fixes false positives on cross-language repos (D16, fixes #340). | |
| max_depth | No | ``context`` action — impact radius depth (default: 2). | |
| repo_root | No | Repository root path (auto-detected). Both actions. | |
| changed_files | No | ``context`` action — files to review (auto-detected from git if omitted). | |
| include_source | No | ``context`` action — include source code snippets (default: true). | |
| show_line_shifts | No | ``delta`` action — when True, include nodes whose ``line_start`` moved between ``from_sha`` and ``to_sha`` in the response (default False). | |
| max_lines_per_file | No | ``context`` action — max source lines per file (default: 200). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |