Skip to main content
Glama

git_precommit_check

git_precommit_check

Validates staged TS/TSX files for auth guard completeness and correct server/client separation, then provides a clear continue or stop reason to enforce code quality before commit.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdNo
projectRefNo
publicRouteGlobsNo
authGuardSymbolsNo
serverOnlyModulesNo
includeExtensionsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolNameYes
projectIdYes
projectRootYes
gitRootYes
stagedChangesYes
stagedFilesYes
checkedFilesYes
skippedFilesYes
findingsYes
warningsYes
policyYes
continueYes
stopReasonNo
_hintsYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations indicate it is not read-only and not idempotent. The description adds that it persists findings to Reef (unless disabled), never edits the index or worktree, and uses discovered auth guards and allowlists. This goes beyond annotations by detailing side effects and constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the main purpose and actions in the first sentence. It is detailed but not overly verbose; each sentence adds value. A slight reduction in length could improve conciseness, but it remains efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity and the presence of an output schema, the description covers inputs, actions, side effects, and constraints reasonably well. It does not detail output format (likely covered by output schema) or required permissions, but overall it is adequate for understanding the tool's role.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It mentions using 'discovered project-profile auth guards/server-only modules' and 'optional allowlists', which maps to some parameters (authGuardSymbols, serverOnlyModules, possibly publicRouteGlobs), but the core parameters projectId, projectRef, and includeExtensions are not explained. Only partial value added.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it is a pre-commit guard for staged TS/TSX files that checks auth guards and boundary mistakes, persists findings, and returns hook-friendly output. It uses specific verbs and resources, distinguishes itself from sibling tools by focusing on git pre-commit checks.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies it is for use in git pre-commit hooks but does not explicitly state when to use it versus alternatives or when not to use it. No cross-references to sibling tools or exclusion criteria are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/drhalto/agentmako'

If you have feedback or need assistance with the MCP directory API, please join our Discord server