A deterministic guardrail for AI-edited code that reviews only changed lines and returns structured findings before code reaches disk. Runs as MCP server, CLI, editor extension, pre-commit hook, and CI integration.
DiffGate provides 4 read-only code search and analysis tools with basic JSON Schema input definitions. All tools have descriptions and documented parameters, but descriptions are minimal (10-30 chars) and lack LLM optimization. Parameter descriptions are present but sparse. No output schemas are documented. Error handling guidance is absent. The tool set is well-named (verb_noun convention) and properly scoped, but lacks the depth and completeness expected of production agent tools. STDIO-only transport limits overall utility despite reasonable tool definitions.
Find references to a symbol name across the repository (whole-word search).
Who last changed a specific line (author, commit, summary).
Search the repository with an extended-regex pattern. Returns matching file:line:text.
Read a file (optionally a line range, max 200 lines) from the repository.
Tool descriptions are under 35 characters and lack LLM-optimizing context. All four tools have minimal descriptions that do not explain when to use them or what they return.
No output schemas are documented. LLMs cannot plan downstream calls or extract chaining IDs (e.g., file paths for subsequent read_file calls) without knowing response structure. Read-only tools benefit from documented return fields.
Error handling provides no recovery guidance. If grep fails due to invalid regex or read_file hits a line limit, LLMs receive no actionable error messages or retry strategies.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 52 | 2026-07-28+ | v2 |
Parameter descriptions are terse. 'Extended regex to search for' (for grep pattern) lacks format/escape guidance. 'Identifier to look for' (for find_references symbol) does not clarify case sensitivity or scope.
No pagination or result limiting documented. read_file accepts startLine/endLine (max 200 lines mentioned in description) but grep and find_references do not. For large repositories, unbounded result sets could exhaust context.
read_file has implicit max (200 lines) mentioned only in description text, not as a parameter constraint or schema limit.