Skip to main content
Glama
commit-check

commit-check-mcp

Official
by commit-check

validate_push_safety

Validates that a push is not a force push to prevent overwriting history. Use before pushing to ensure force-push protection rules are satisfied.

Instructions

Validate that a push is not a force push. Read-only validation. Returns a structured result with overall status and per-check results (check name, status, value, error, suggest). By default, force push is rejected; configure via 'push.allow_force_push' in config.

Use this before performing a git push to ensure force-push protection rules are satisfied. Only validates the no_force_push rule. Use validate_commit_context for combined checks.

Parameters:

  • push_refs (optional): The push ref specification to validate. If omitted, checks upstream fallback state.

  • config (optional): Inline JSON config overrides.

  • repo_path (optional): Path to the git repository.

  • config_path (optional): Path to a custom commit-check TOML config file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
configNo
push_refsNo
repo_pathNo
config_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Discloses read-only behavior, describes return format (structured result with status and per-check details), and mentions configuration for allowing force push, all without 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?

Efficiently structured: first line states purpose and behavior, then output, usage, and parameter list. No unnecessary words.

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

Completeness5/5

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

Covers all aspects: purpose, usage, output format, parameters, configuration, and sibling reference. Output schema exists, so return details are complete.

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

Parameters4/5

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

With 0% schema coverage, description adds meaning for all 4 parameters: explains push_refs (and behavior if omitted), config (inline JSON overrides), repo_path, and config_path. Lacks some detail on expected formats but is helpful.

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?

Clearly states the tool validates that a push is not a force push, explicitly mentions it is read-only, and distinguishes itself from sibling 'validate_commit_context' for combined checks.

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

Usage Guidelines5/5

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

Provides explicit guidance: use before git push for force-push protection, notes it only validates the no_force_push rule, and directs to sibling for combined checks.

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/commit-check/commit-check-mcp'

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