Skip to main content
Glama

request_changes_pr

Request changes on a Bitbucket pull request to indicate required modifications before approval. Submit feedback to developers for specific repository pull requests.

Instructions

Request changes on a pull request.

Args:
    repo_slug: Repository slug
    pr_id: Pull request ID

Returns:
    Confirmation of change request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_slugYes
pr_idYes

Implementation Reference

  • MCP tool handler function for 'request_changes_pr'. Decorated with @mcp.tool() for registration, handles input validation implicitly via type hints, gets Bitbucket client, calls the core method, and formats response.
    @mcp.tool()
    @handle_bitbucket_error
    @formatted
    def request_changes_pr(repo_slug: str, pr_id: int) -> dict:
        """Request changes on a pull request.
    
        Args:
            repo_slug: Repository slug
            pr_id: Pull request ID
    
        Returns:
            Confirmation of change request
        """
        client = get_client()
        result = client.request_changes_pr(repo_slug, pr_id)
        return {
            "pr_id": pr_id,
            "requested_by": result.get("user", {}).get("display_name"),
        }
  • Helper method in BitbucketClient that executes the actual Bitbucket API POST request to /pullrequests/{pr_id}/request-changes endpoint.
    def request_changes_pr(
        self, repo_slug: str, pr_id: int
    ) -> dict[str, Any]:
        """Request changes on a pull request.
    
        Args:
            repo_slug: Repository slug
            pr_id: Pull request ID
    
        Returns:
            Request info
        """
        result = self._request(
            "POST",
            self._repo_path(repo_slug, "pullrequests", str(pr_id), "request-changes"),
        )
        return self._require_result(result, "request changes on PR", f"#{pr_id}")
  • Registration of the tool via @mcp.tool() decorator in FastMCP framework.
    @mcp.tool()
    @handle_bitbucket_error
    @formatted
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the action ('Request changes') which implies a mutation, but doesn't disclose behavioral traits like whether this requires specific permissions, if it's reversible, what happens to the PR status, or if it sends notifications. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 appropriately sized and front-loaded with the core purpose in the first sentence. The Args/Returns sections are structured but could be more concise (e.g., merging into a single sentence). Every sentence adds value, with no redundant information.

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

Completeness2/5

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

Given the complexity (a mutation tool for PR reviews), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like permissions, side effects, or error conditions, and the return value is vaguely described as 'Confirmation of change request' without details. This leaves significant gaps for an agent to use the tool effectively.

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. It lists the parameters ('repo_slug', 'pr_id') and provides basic semantics ('Repository slug', 'Pull request ID'), which adds meaning beyond the bare schema. However, it doesn't explain format details (e.g., what a 'slug' is, where to find the PR ID) or constraints, leaving some ambiguity.

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 the action ('Request changes') and target resource ('on a pull request'), which is specific and unambiguous. It distinguishes from siblings like 'approve_pr' or 'decline_pr' by indicating a review action that requests modifications rather than approving or rejecting outright. However, it doesn't explicitly differentiate from 'add_pr_comment', which could also be used for feedback.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., needing review permissions), when it's appropriate (e.g., during code review to request fixes), or what alternatives exist (e.g., using 'add_pr_comment' for non-blocking feedback). This leaves the agent to infer usage from context alone.

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/JaviMaligno/mcp-server-bitbucket'

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