grade_files
Grade the entire current contents of the given files (or the whole repo
if paths is empty). Slower than grade_diff; use for thorough review.
Returns a JSON Report.
Input schema
Section titled “Input schema”{ "type": "object", "properties": { "paths": { "type": "array", "items": { "type": "string" }, "description": "Paths to grade. Empty = whole repo." } }}Paths are relative to the repository root. Both files and directories
are accepted; directories are walked respecting .gitignore.
Output
Section titled “Output”A JSON Report, wrapped in the MCP
content envelope. Identical shape to grade_diff, but findings are
not filtered to a diff — every line in the listed files is in scope.
When to call
Section titled “When to call”- Auditing existing code for debt.
- Reviewing a specific subset of files in detail.
- Confirming a refactor didn’t regress neighbouring code (grade the refactored file plus its callers).
When not to call it:
- In the inner edit loop. Use
grade_diffinstead. - For “did my last change pass?” —
grade_diffanswers that faster.
Performance
Section titled “Performance”A few seconds to tens of seconds, depending on repo size and whether LLM rules are enabled. Diff mode is two to three orders of magnitude faster on a typical change.
Examples
Section titled “Examples”Grade the whole repo:
{ "name": "grade_files", "arguments": { "paths": [] } }Grade specific files:
{ "name": "grade_files", "arguments": { "paths": ["src/parser.rs", "src/lexer.rs"] }}Grade a directory:
{ "name": "grade_files", "arguments": { "paths": ["src/handlers/"] } }Errors
Section titled “Errors”| MCP error code | Cause |
|---|---|
-32602 (invalid params) | Malformed paths argument. |
-32603 (internal error) | Path doesn’t exist, file isn’t UTF-8, engine error. |
See also
Section titled “See also”grade_diff— fast, diff-only.- Scopes — full-file vs diff semantics.
- Report — output schema.