git_precommit_check
git_precommit_checkChecks staged TypeScript files for missing API auth guards and Next.js server/client boundary violations, returning stop or continue signal for pre-commit hooks.
Instructions
Git pre-commit guard for staged TS/TSX files: reads staged blobs, checks API route auth guards and Next.js server/client boundary mistakes, persists staged Reef findings unless MAKO_REEF_BACKED disables the migration, and returns hook-friendly continue/stopReason output. Uses discovered project-profile auth guards/server-only modules plus optional .mako/git-guard.json/input allowlists. Never edits the index or worktree.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "git_precommit_check"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | No | ||
| projectRef | No | ||
| authGuardSymbols | No | ||
| publicRouteGlobs | No | ||
| includeExtensions | No | ||
| serverOnlyModules | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _hints | Yes | ||
| policy | Yes | ||
| gitRoot | Yes | ||
| continue | Yes | ||
| findings | Yes | ||
| toolName | Yes | ||
| warnings | Yes | ||
| projectId | Yes | ||
| stopReason | No | ||
| projectRoot | Yes | ||
| stagedFiles | Yes | ||
| checkedFiles | Yes | ||
| skippedFiles | Yes | ||
| stagedChanges | Yes |