Skip to main content
Glama

precommit

Read-only

Validates git changes and repository state before committing. Uses systematic analysis to assess impact, identify risks, and verify completeness across repositories.

Instructions

Validates git changes and repository state before committing with systematic analysis. Use for multi-repository validation, security review, change impact assessment, and completeness verification. Guides through structured investigation with expert analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoAbsolute path to the repository root. Required in step 1.
stepYesStep 1: outline how you'll validate the git changes. Later steps: report findings. Review diffs and impacts, use `relevant_files`, and avoid pasting large snippets.
modelYesCurrently in auto model selection mode. CRITICAL: When the user names a model, you MUST use that exact name unless the server rejects it. If no model is provided, you may use the `listmodels` tool to review options and select an appropriate match. Top models: gemini-2.5-pro (score 100, 1.0M ctx, thinking, code-gen); gemini-3-pro-preview (score 100, 1.0M ctx, thinking, code-gen); gemini-2.5-flash (score 61, 1.0M ctx, thinking); gemini-2.0-flash (score 56, 1.0M ctx, thinking); gemini-2.0-flash-lite (score 42, 1.0M ctx).
imagesNoOptional absolute paths to screenshots or diagrams that aid validation.
findingsYesRecord git diff insights, risks, missing tests, security concerns, and positives; update previous notes as you go.
focus_onNoOptional emphasis areas such as security, performance, or test coverage.
compare_toNoOptional git ref (branch/tag/commit) to diff against; falls back to staged/unstaged changes.
confidenceNoConfidence level: exploring (just starting), low (early investigation), medium (some evidence), high (strong evidence), very_high (comprehensive understanding), almost_certain (near complete confidence), certain (100% confidence locally - no external validation needed)
hypothesisNoCurrent theory about issue/goal based on work
step_numberYesCurrent pre-commit step number (starts at 1).
temperatureNo0 = deterministic · 1 = creative.
total_stepsYesPlanned number of validation steps. External validation: use at most three (analysis → follow-ups → summary). Internal validation: a single step. Honour these limits when resuming via continuation_id.
issues_foundNoList issues with severity (critical/high/medium/low) plus descriptions (bugs, security, performance, coverage).
files_checkedNoAbsolute paths for every file examined, including ruled-out candidates.
thinking_modeNoReasoning depth: minimal, low, medium, high, or max.
include_stagedNoWhether to inspect staged changes (ignored when `compare_to` is set).
precommit_typeNo'external' (default, triggers expert model) or 'internal' (local-only validation).external
relevant_filesNoAbsolute paths of files involved in the change or validation (code, configs, tests, docs). Must be absolute full non-abbreviated paths.
continuation_idNoUnique thread continuation ID for multi-turn conversations. Works across different tools. ALWAYS reuse the last continuation_id you were given—this preserves full conversation context, files, and findings so the agent can resume seamlessly.
severity_filterNoLowest severity to include when reporting issues.all
include_unstagedNoWhether to inspect unstaged changes (ignored when `compare_to` is set).
relevant_contextNoMethods/functions identified as involved in the issue
next_step_requiredYesTrue to continue with another step, False when validation is complete. CRITICAL: If total_steps>=3 or when `precommit_type = external`, set to True until the final step. When continuation_id is provided: Follow the same validation rules based on precommit_type.
use_assistant_modelNoUse assistant model for expert analysis after workflow steps. False skips expert analysis, relies solely on your personal investigation. Defaults to True for comprehensive validation.
Behavior4/5

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

The description consistently aligns with the readOnlyHint annotation, emphasizing validation and analysis. It adds value by explaining the structured multi-step process, use of expert models, and distinction between external and internal validation. No contradictions with annotations.

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

Conciseness5/5

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

The description consists of three succinct sentences, immediately stating the core purpose, use cases, and guidance. No unnecessary wording; every sentence earns its place.

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

Completeness3/5

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

Given the tool's complexity (24 parameters, no output schema), the description provides only high-level context. It omits details on the multi-step validation process and parameter interdependencies, which are partially covered in the schema but could benefit from description-level hints.

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

Parameters3/5

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

Schema description coverage is 100%, so baseline 3 is appropriate. The description does not elaborate on parameter usage beyond what the schema provides, but the tool's high-level purpose and workflow context are clear.

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

Purpose4/5

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

The description clearly states the tool validates git changes before committing, with specific use cases for multi-repository validation, security review, and change impact assessment. It differentiates from siblings like codereview or secaudit by being a systematic validation, but does not explicitly exclude them.

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 lists use cases ('multi-repository validation, security review, change impact assessment, and completeness verification') but fails to provide guidance on when not to use this tool or suggest alternative sibling tools for narrower tasks like pure security audits.

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/bigl34/pal-mcp-server'

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