Skip to main content
Glama
TheTeamRAH

scm-broker-mcp

by TheTeamRAH

close_pull_request

Close or decline a pull request on GitHub or Bitbucket Cloud, returning the updated state.

Instructions

Close or decline a pull request.

Args: provider: Provider key. repo: Repository identity. pull_request_id: Provider pull-request identifier. raw: Include the provider payload.

Returns: Normalized write-result mapping with the resulting state.

Examples: Input: {"repo": "o/r", "pull_request_id": "7"}. Output: {"id": "7", "state": "closed", ...}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rawNo
repoYes
providerYes
pull_request_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It states 'Normalized write-result mapping' and shows an example output, but it omits key behavioral details: side effects, required permissions, reversibility, or what distinguishes 'close' from 'decline.' The write nature is implied but not elaborated, and there's no mention of error conditions.

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?

The description is compact and well-structured: a one-line summary, then Args, Returns, and Examples. It front-loads the action and avoids fluff. The example is helpful for understanding the output. Slight redundancy exists in the Returns and Example sections, but overall it's efficient.

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 description provides an example output and mentions a normalized write-result mapping, which partially covers the return behavior. However, it lacks essential context: the difference between close and decline, prerequisites (e.g., PR must be open), or any error handling. Given the output schema exists (though not shown), some return details are covered, but the operational nuances are missing.

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 description coverage is 0%, so the description must compensate. The Args section gives a short label for each parameter: 'provider: Provider key,' 'repo: Repository identity,' 'pull_request_id: Provider pull-request identifier,' and 'raw: Include the provider payload.' These are minimal and somewhat vague (e.g., what is a 'provider key'?), but they do add meaning beyond the bare schema names. The example demonstrates usage but omits the provider parameter.

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 opens with 'Close or decline a pull request,' which is a specific verb-resource pair that clearly distinguishes it from siblings like merge_pull_request or update_pull_request. The addition of 'or decline' captures a nuance that makes the tool's role explicit, and the example input/output reinforces the intent.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives. It doesn't explain when to close versus decline, nor does it mention conditions like whether the PR must be open or what happens if it's already closed. No explicit exclusions or cross-references to sibling tools are given.

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