gitlab_smart_diff
Compare Git refs intelligently, retrieve structured diff hunks with configurable context lines and size limits, and optimize for efficient code reviews. Supports large diffs and auto-detects project details.
Instructions
Retrieve diff between refs with intelligent chunking, configurable context lines, and size limits. Returns structured hunks suitable for code review. Handles large diffs gracefully.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
context_lines | No | Number of unchanged lines to show around changes in diff (integer). Default: 3. Range: 0-10 | |
from_ref | Yes | Source ref for comparison (string, required). Branch name, tag, or commit SHA to compare from | |
max_file_size | No | Maximum file size in bytes to include in diff (integer). Files larger are skipped. Default: 50000 (50KB) | |
project_id | No | Project ID (integer) or path (string like 'group/project'). Optional - auto-detects from current git repository if not provided | |
to_ref | Yes | Target ref for comparison (string, required). Branch name, tag, or commit SHA to compare to |