scrubby_review
Get Scrubby's codebase knowledge for a specific file — domain, conventions, connected files, and git history. The tool your AI editor calls before editing a file.
Returns codebase knowledge for a specific file: which domain it belongs to, which segment-level conventions apply, which files historically change with it, and the relevant slice of git history. This is the tool your AI editor should call before editing any file.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file_path | string | Yes | Relative path to the file within the repository (e.g. app/models/user.rb). |
repo_id | number | No | Scrubby repository ID. Auto-detected if omitted. |
repo_name | string | No | Repository name (e.g. api). Used to auto-resolve in remote mode when multiple repos are indexed. |
Response
A structured payload with these top-level fields:
summary— what the file does, in one paragraph.domain— the primary domain this file belongs to, with its name and a short description.segment— the segment containing this file, with the high-confidence conventions extracted for it.connected_files— files that historically change with this one (above the co-change threshold).api_surface— for code files, the public exports and their consumers.history— recent commits that touched this file, with the domains they affected.
The exact shape is part of the protocol response; let your editor render it. Don’t parse free-text output.
Typical usage
In your AI editor:
"Use scrubby_review on app/models/user.rb before making changes."
In practice, agents call this tool automatically when they’re about to edit a file — the MCP server’s instructions hook tells them to.
What your agent does with the response
A well-prompted agent will:
- Read the
domainandsegmentto understand the area of the codebase. - Read the
conventionsto know the patterns to follow. - Read
connected_filesto know what else may need to change. - Generate code that fits, instead of guessing from filenames.
Errors
| Code | Meaning |
|---|---|
file_not_found | The path doesn’t exist in the indexed snapshot. Scrubby reads from GitHub, not your local working tree — commit and push to the indexed branch, then re-run scrubby_index. |
repo_not_indexed | The repo hasn’t been indexed yet. |
not_authenticated | OAuth session expired. |
Last updated