Skip to main content
Glama
ai-commit-helper-mcp

ai-commit-helper-mcp

by mahshid

get_commit_context

Retrieves the staged Git diff and effective commit-message rules for a local repository so you can generate and validate commit-message suggestions.

Instructions

Get the staged Git diff and effective commit-message rules for a local repository. Returns a status of "changes" or "no_changes", the diff, and the rules to use when generating commit-message suggestions.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "repositoryPath": "<repositoryPath>"
    },
    "name": "get_commit_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
repositoryPathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does add real behavioral context by disclosing the two possible status values ("changes" or "no_changes") and what is returned (diff plus rules), which signals read-only behavior. It does not cover what happens for an invalid or non-Git path, whether the diff is truncated, or permission requirements.

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?

Two short sentences with the primary action front-loaded and no filler. Slightly compressed: the return-value sentence could be folded more tightly, but nothing is wasted.

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?

For a single-parameter read tool with no output schema, the description covers purpose and return shape adequately, including the status enum values. The remaining gap is path semantics and failure behavior, which matters for a tool that must locate a Git repository on disk.

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 coverage is 0% for the single required parameter, so the description must compensate and does not. "repositoryPath" appears only implicitly via "a local repository"; there is no guidance on whether it must be an absolute path, a repo root, or whether it can be a subdirectory.

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?

Uses a specific verb ("Get") with two named resources: the staged Git diff and the effective commit-message rules for a local repository. An agent can tell this is a read/context-gathering tool. However, it never references the sibling tools (create_commit_rules, validate_commit_message), so differentiation must be inferred rather than stated.

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?

Usage is only implied: the mention that the rules are "to use when generating commit-message suggestions" signals this is a precursor step. There is no explicit statement of when to call it versus when to create rules or validate a message, and no prerequisites or exclusions.

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