Skip to main content
Glama
mhaviv

pr-narrator-mcp

by mhaviv

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
BASE_BRANCHNoBase branch for PRs (default: auto-detected from repo)
TICKET_LINKNoTicket URL template (e.g., 'https://jira.example.com/browse/{ticket}')
PREFIX_STYLENoPrefix format: 'capitalized' or 'bracketed'
TICKET_PATTERNNoTicket regex pattern (e.g., '[A-Z]+-\\d+')
DEFAULT_REPO_PATHNoFallback repo path for single-repo workflows
PR_TEMPLATE_PRESETNoForce a PR template preset: 'mobile', 'backend', 'devops', etc.
PR_DETECT_REPO_TEMPLATENoEnable/disable repo template detection (default: 'true')

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_configA

Get the current pr-narrator configuration. Returns settings from MCP env vars or defaults.

Set in MCP JSON:

  • BASE_BRANCH: Base branch for PRs (e.g., "develop")

  • TICKET_PATTERN: Ticket regex (e.g., "[A-Z]+-\d+")

  • TICKET_LINK: Ticket URL template

  • PREFIX_STYLE: "capitalized" or "bracketed"

  • DEFAULT_REPO_PATH: Fallback repo path for single-repo workflows

analyze_git_changesA

Analyze the current git repository state and changes. Provides context for generating commit messages and PR content.

Returns:

  • Repository info (branch, base branch)

  • Ticket extracted from branch name

  • Branch prefix (task/, bug/, feature/, etc.)

  • Staged changes with file list and suggested commit type/scope

  • Branch changes since base branch with commit history

  • Working tree status (unstaged modified, untracked, and deleted files)

  • All tickets found in branch name and commits

Use this before generating commits or PRs to understand the changes.

generate_commit_messageA

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"

validate_commit_messageA

Validate a commit message against configured rules.

Checks:

  • Title length (max characters)

  • Conventional commit format (if configured)

  • Required scope (if configured)

  • Imperative mood (e.g., "Add" not "Added")

  • Title capitalization

  • No trailing period

extract_ticketsA

Extract ticket numbers from the current branch, commits, and optional additional text.

Uses TICKET_PATTERN env var to find tickets in:

  1. Branch name (e.g., "feature/PROJ-1234-add-login")

  2. Commit messages since base branch

  3. Additional text provided

generate_pr_titleA

Generate a PR title based on branch info.

Prefix behavior:

  • If ticket found in branch name, uses ticket as prefix

  • If no ticket but branch has prefix (task/, bug/, etc.), uses that

If no summary is provided, extracts one from the branch name.

generate_pr_descriptionA

Generate a PR description with sections.

Auto-populates:

  • "purpose": Summary from commits, files, and branch name

  • "commits": Lists all commits since base branch

  • "extracted": Lists all tickets found

generate_prA

Generate a PR title and description.

IMPORTANT: The returned 'description' has a PLACEHOLDER Purpose. You MUST rewrite it using purposeContext.commitTitles, purposeContext.commitBullets, and purposeGuidelines BEFORE showing to the user.

You MUST also rewrite the title to reflect ALL changes, not just the branch name. Read ALL commitTitles and commitBullets to understand the full scope before writing.

FORMAT:

  • 1-2 changes: prose sentence(s)

  • 3+ changes: intro sentence + bullet points

Example (3+ changes): "Enables automatic Slack notifications to PR authors when builds fail.

  • Extracts PR author from GitHub PR metadata

  • Maps GitHub usernames to Slack user IDs for @mentions

  • Posts threaded failure notifications

  • Includes unit tests for notification functionality"

Show ONLY the final title + rewritten description. Never mention "MCP provided" or show raw purposeContext.

get_pr_templateA

Returns the resolved PR template for a repository, showing which sections will appear based on repo template detection, domain auto-detection, or explicit preset. Useful for previewing the template structure before generating a PR.

generate_changelogA

Generate release notes / changelog from git commit history between two refs.

Analyzes commits between two refs (tags, SHAs, or branches) and produces a formatted changelog. Supports three output formats: Keep a Changelog (keepachangelog), GitHub Release (github-release), and plain text.

Auto-detects:

  • Latest tag as the start ref if not provided

  • Conventional commit types and scopes

  • Non-conventional commit types via keyword inference

  • Co-authors from commit trailers

  • Ticket references from commit messages

Use this when a user wants to generate release notes, changelogs, or understand what changed between two versions.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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