Skip to main content
Glama
mhaviv

pr-narrator-mcp

by mhaviv

generate_commit_message

Read-onlyIdempotent

Generate commit messages from staged git changes with automatic prefix formatting for ticket numbers and branch types.

Instructions

Prepare commit message context from staged changes. Falls back to unstaged working tree changes when nothing is staged, so you can analyze changes before running 'git add'. Check 'source' in the response to see whether staged or unstaged changes were used, and 'hint' for staging instructions.

TWO MODES:

  1. WITH summary parameter (recommended): Returns a ready-to-use commit message. Pass a brief description of what the changes do, and the tool formats it with the proper prefix, capitalization, and validation. Check context.availableSummaryLength to see how many characters your summary can use (prefix uses the rest). When includeBody is true, the diff and changeSummary are provided so YOU can write a meaningful body — the tool does NOT auto-generate the body.

  2. WITHOUT summary: Returns context for YOU to compose the message.

    • 'title' is a best-effort PLACEHOLDER based on file patterns

    • 'changes.diff' contains the actual diff

    • 'changeSummary' groups ALL files by category (Swift source, config, etc.)

    • 'commitGuidelines' explains how to write the message

    • YOU must analyze the diff and compose a meaningful title and body

For best results: First analyze the staged changes yourself, then call this tool WITH the summary parameter to get a properly formatted commit message.

Prefix behavior:

  • No prefix on main/master/develop branches

  • If ticket found: "PROJ-123: message"

  • If branch type: "Task: message", "Bug: message"

Examples:

  • "Task: Fix suffix removal for usernames containing -by- substring"

  • "Bug: Fix HolaSpark loading race condition with ReachabilityState enum"

  • "WTHRAPP-3104: Update winter weather icons and illustration mappings"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoPathNoPath to the git repository. IMPORTANT: Always pass the user's current project/workspace directory.
summaryNoSummary of changes - RECOMMENDED for best results. Tool formats it with proper prefix.
typeNoOptional commit type override (feat, fix, etc.)
scopeNoOptional scope override
includeBodyNoWhether to include a commit body
Behavior4/5

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

Adds significant behavioral context beyond annotations: fallback to unstaged, prefix rules based on branch, response fields (source, hint), and that the body is not auto-generated. Annotations already indicate read-only and idempotent, which description complements.

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?

Well-structured with clear sections, examples, and bullet points. Some redundancy (e.g., repeating 'best results' advice) but overall efficient for the complexity.

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: modes, fallback, prefix, response meaning, and examples. No output schema, but description sufficiently explains return values. Handles edge cases like unstaged changes and branch-based prefixes.

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?

Schema coverage is 100%, but description adds value by explaining the summary length constraint and that includeBody provides diff for manual body writing. Examples clarify parameter usage further.

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?

The description clearly states it prepares commit message context from staged changes with two modes. It distinguishes itself from sibling tools like analyze_git_changes by focusing on commit message generation but does not explicitly name alternatives.

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 when-to-use for each mode, recommends using the summary parameter, and explains fallback behavior. Gives best practices and examples, leaving little ambiguity.

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/mhaviv/pr-narrator-mcp'

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