Skip to main content
Glama

local_commit_msg

Read-only

Generates commit messages from diffs with a local code model. Reads diff files server-side so large diffs don't enter the AI's context.

Instructions

PREFER this tool over reading the file with Read when the file is large (>200 lines / >10 KB) and you only need a commit message, not the literal content.

Drafts a commit message from a diff, with a local code model.

Pass 'path' to a diff file (e.g. the output of `git diff` dumped to a file) and it is read
server-side, so the full diff does NOT enter Claude's context. Alternatively pass 'diff' as
text. ALWAYS review the message before using it.

Args:
    diff: The diff as text (use this or 'path').
    path: Path to a file with the diff (read server-side).
    style: 'conventional' (Conventional Commits) or 'plain'.

Input Schema

NameRequiredDescriptionDefault
diffNo
pathNo
styleNoconventional

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, and the description adds genuinely new context: the file is read server-side so the diff never enters Claude's context, and the output must always be reviewed. It does not describe latency/quality limits of the local model, but with these annotations this is strong.

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?

Front-loaded with the PREFER routing rule, then the action, then the args list. Every sentence earns its place; slightly long but no filler.

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?

An output schema exists, so return values need no explanation. Combined with routing guidance, both input modes, the style options, and the review caution, an agent has everything needed to invoke it 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?

Schema description coverage is 0% and the schema has no enum, so the description carries the whole burden — and it does: diff is text, path is a server-read file (mutually exclusive with diff), and style takes 'conventional' or 'plain', an enum the schema itself lacks.

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?

Specific verb+resource: drafts a commit message from a diff using a local code model. It also names what it is not (a way to read contents), so an agent can separate it from local_summarize / local_explain_code without opening the 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?

Explicitly says PREFER this over reading the file with Read when the file is large (>200 lines / >10 KB) and only a commit message is needed. Names the alternative tool and the exact condition that selects this one, plus a review-before-use rule.

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