Skip to main content
Glama
commit-check

commit-check-mcp

Official
by commit-check

Validate commit context

validate_commit_context
Read-onlyIdempotent

Validate commit message, branch name, and author details together in one call, returning pass/fail/warn results with fixes and suggestions before you commit.

Instructions

Run the commit message, branch name and author checks together in one call, for whichever of message, branch, author_name and author_email you pass. Read-only.

Returns {status, warnings, checks[]}. status is 'pass', 'fail' or 'skip': only 'fail' is a rejection; 'skip' means every check skipped, so nothing was validated and the result is not approval. warnings is the number of checks with status 'warn'. Each check has: rule_id (stable rule id, e.g. 'CC001'); check (rule name, e.g. 'message'); status 'pass' | 'fail' | 'warn' | 'skip' ('warn' = the config lists the check under warn, so the finding is reported without failing the run; 'skip' = the rule did not run, e.g. the author is in ignore_authors or there was nothing to check); value (what was checked); error (why it failed); suggest (advice for a person); fix (the corrected value when the correction is unambiguous, else ''); docs_url (documentation for the rule). On 'fail', apply a non-empty fix verbatim; when fix is '', rewrite following suggest; then validate again.

Use this to validate several aspects of a commit you are about to make with a single call. At least one of message, branch, author_name or author_email is required; omitted aspects are not checked. For one aspect use validate_commit_message, validate_branch_name or validate_author_info; for the commit already at HEAD use validate_repository_state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
branchNoBranch name to validate, e.g. 'feature/login'. Omit to validate the branch currently checked out in repo_path, which must then be a git repository. Must be non-empty when provided.
configNoInline commit-check config overrides as a JSON object, merged on top of the built-in defaults and any config file, e.g. {"warn": ["message"]} or {"commit": {"require_body": true}}.
messageNoCommit message text to validate: subject line, optional blank line, body. Omit to skip the message checks. Must be non-empty when provided.
repo_pathNoPath to the git repository to validate against. Its cchk.toml or commit-check.toml (also looked up under .github/) is loaded, and a relative config_path is resolved from it. Omit to use the server's working directory.
author_nameNoAuthor name to validate, e.g. 'Alice Example'. Omit to read it from repo_path (git config user.name, falling back to the latest commit's author). Must be non-empty when provided.
config_pathNoPath to a commit-check TOML config file, used instead of the repository's own cchk.toml/commit-check.toml; a relative path is resolved from repo_path.
author_emailNoAuthor email to validate, e.g. 'alice@example.com'. Omit to read it from repo_path (git config user.email, falling back to the latest commit's author). Must be non-empty when provided.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.1.10
    • addedInput schema / properties / author_email / description
      Added value: +"Author email to validate, e.g. 'alice@example.com'. Omit to read it from repo_path (git config user.email, falling back to the latest commit's author). Must be non-empty when provided."
    • addedInput schema / properties / author_name / description
      Added value: +"Author name to validate, e.g. 'Alice Example'. Omit to read it from repo_path (git config user.name, falling back to the latest commit's author). Must be non-empty when provided."
    • addedInput schema / properties / branch / description
      Added value: +"Branch name to validate, e.g. 'feature/login'. Omit to validate the branch currently checked out in repo_path, which must then be a git repository. Must be non-empty when provided."
    • addedInput schema / properties / config / description
      Added value: +"Inline commit-check config overrides as a JSON object, merged on top of the built-in defaults and any config file, e.g. {\"warn\": [\"message\"]} or {\"commit\": {\"require_body\": true}}."
    • addedInput schema / properties / config_path / description
      Added value: +"Path to a commit-check TOML config file, used instead of the repository's own cchk.toml/commit-check.toml; a relative path is resolved from repo_path."
    • addedInput schema / properties / message / description
      Added value: +"Commit message text to validate: subject line, optional blank line, body. Omit to skip the message checks. Must be non-empty when provided."
    • addedInput schema / properties / repo_path / description
      Added value: +"Path to the git repository to validate against. Its cchk.toml or commit-check.toml (also looked up under .github/) is loaded, and a relative config_path is resolved from it. Omit to use the server's working directory."
  2. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

The description explains the return structure, the meaning of statuses (pass/fail/warn/skip), and the required action on 'fail' (apply fix verbatim or rewrite based on suggest). It also mentions config merging and read-only behavior, adding depth beyond the readOnlyHint annotation. No contradictions.

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 is detailed but tightly organized; it front-loads the core purpose, then explains the output structure, then provides usage guidance and sibling alternatives. Every sentence adds essential information without redundancy.

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?

The tool is complex (multiple parameter combinations, output schema, config handling, and follow-up instructions), and the description covers all necessary aspects: what it validates, how to use it, what the output means, and what to do next. It is self-sufficient for an agent to invoke correctly.

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

Parameters5/5

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

Each of the 7 parameters is described with examples, defaults, and fallback behavior (e.g., author_name falls back to git config or latest commit). The schema coverage is 100%, and the description clarifies how omitting parameters affects validation.

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 runs commit message, branch name, and author checks together in a single call, distinguishing it from single-aspect siblings and the repository-state validator. The scope is precise and action-oriented.

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?

Explicitly indicates when to use this tool (multiple aspects) and when to use alternatives (validate_commit_message, validate_branch_name, validate_author_info, validate_repository_state). Also states that at least one parameter is required and omitted aspects are not checked.

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