Skip to main content
Glama

generate_pr_payload

Analyzes Git diffs and Bitbucket PR data to produce a compact JSON payload for AI-powered PR description generation, reducing token usage.

Instructions

Extracts Bitbucket PR or local Git branch diffs, commits, and AST module categorizations into a compact JSON schema (~1-2KB) for AI PR description generation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pr_urlNoFull Bitbucket PR URL (e.g., https://bitbucket.org/workspace/repo/pull-requests/123).
repo_pathNoAbsolute path to target Git repo directory.
source_branchNoSource branch name (e.g., feature/WCE-815). Defaults to currently checked out branch.
target_branchNoTarget branch name (e.g., main or release/staging). Defaults to main.
Behavior3/5

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

No annotations are provided, so the description carries full burden. The term 'extracts' suggests a read-only operation, but there is no explicit statement about whether the tool modifies any state, requires authentication, or has rate limits. The description is somewhat vague on behavioral traits, earning a moderate score.

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

Conciseness5/5

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

The description is a single sentence that concisely conveys the tool's purpose, input sources, and output format. It is front-loaded with the key action and resource, with no redundant or extraneous words. Every part of the sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 4 parameters and no output schema, yet the description only broadly mentions the output as 'diffs, commits, and AST module categorizations' without detailing the exact structure or fields. While it gives a size estimate (~1-2KB), an agent would benefit from knowing the output keys or schema. The description is partially complete but lacks depth for full contextual understanding.

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 input schema already documents all four parameters with descriptions. The tool description does not add additional meaning beyond what is in the schema (e.g., example values or relationships). Per guidelines, with high coverage, baseline is 3, and no extra value is provided.

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?

The description clearly states the tool extracts diffs, commits, and AST categorizations into a compact JSON schema for AI PR description generation. It specifies the resource (Bitbucket PR or local Git branch) and the output format, making the purpose highly specific and unambiguous. No sibling tools exist, so distinction is not needed.

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?

The description implies usage for generating PR descriptions but lacks explicit guidance on when to use this tool versus alternatives or when not to use it (e.g., for simple commit history). No prerequisites or exclusions are mentioned. Since there are no sibling tools, the lack of comparative guidance is less critical, but still leaves room for improvement.

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/Ninh-Duong/mcp-pr-companion'

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