Skip to main content
Glama
commit-check-mcp

commit-check-mcp

Official
by commit-check

Validate author info

validate_author_info
Read-onlyIdempotent

Validates a commit author's name and email against configured rules before committing, returning pass/fail checks and fix suggestions.

Instructions

Validate a commit author's name and/or email against the configured rules (e.g. allowed email domains, name patterns, and under ai_attribution forbid/disclose that the author is not an AI tool). 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 check author metadata before committing. Only the values you pass are checked; if neither is given, both are read from repo_path's git config (falling back to the latest commit) and repo_path must be a git repository. For combined validation use validate_commit_context.

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": "validate_author_info"
  }
}

Input Schema

NameRequiredDescriptionDefault
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}}.
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

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 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 / 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 / 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

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the bare 'Read-only.' sentence adds nothing, but the description goes well beyond structured data: it clarifies that only 'fail' is a rejection and that 'skip' is not approval, explains warn vs skip semantics, and prescribes the remediation loop (apply fix verbatim; if empty, rewrite per suggest; re-validate). The cost is that a large block of text restates the return shape that the output schema already defines.

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

Conciseness3/5

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

Purpose and the sibling routing are front-loaded, which is good, but the middle paragraph enumerates status values and check fields that the output schema already provides, making the definition noticeably longer than needed. The actionable parts (when to use, skip-is-not-approval, remediation loop) are buried between schema restatements.

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?

With zero required parameters, a rich output schema, and full annotation coverage, nothing an agent needs is missing: config resolution, defaulting behavior, status interpretation, and remediation steps are all specified. The tool is complex (config merging, multi-source defaults) and the description carries that complexity adequately.

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 coverage is 100%, so the schema already documents each of the five optional parameters including the omit-to-read-from-git-config behavior. The description adds one genuinely new cross-parameter fact (repo_path must be a git repository when values are omitted) but otherwise repeats schema-level semantics, so the baseline of 3 applies.

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?

States a specific verb and resource ('Validate a commit author's name and/or email') and names the rule domain (allowed email domains, name patterns, ai_attribution). It also distinguishes itself from the sibling that covers the combined case ('For combined validation use validate_commit_context'), so an agent can route between them without opening either schema.

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?

Explains when to use it ('check author metadata before committing'), what happens when inputs are omitted (both read from repo_path's git config, falling back to the latest commit), a precondition (repo_path must be a git repository), and the alternative for combined validation. The only minor gap is that it does not enumerate config-driven skip cases beyond the status definitions.

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