Skip to main content
Glama

branch.link_pull_request

Link a branch to a pull request and post its status comment on GitHub or GitLab. POST /v1/organizations/{id}/projects/{project}/branches/{branch}/pr.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "organization_id": "<organization_id>",
      "project_id": "<project_id>",
      "branch_id": "<branch_id>",
      "provider": "<provider>",
      "repository": "<repository>",
      "number": "<number>",
      "confirm": "<confirm>"
    },
    "name": "branch.link_pull_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoPull request web URL (generic providers)
numberYesnumber (required)
confirmYesMust be true to apply this mutation; otherwise the tool returns the request it would send for approval.
providerYesprovider (required)
branch_idYesbranch_id (required)
project_idYesproject_id (required)
repositoryYesrepository (required)
url_templateNoPreview URL template with {organization}, {project}, {environment}
organization_idYesorganization_id (required)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare the mutation profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false), so the description's main added value is disclosing that a status comment is posted to GitHub/GitLab as a side effect. It omits the two-phase approval flow implied by the confirm parameter, auth requirements on the organization, and what happens on repeat calls (whether a duplicate comment is posted). Note that openWorldHint=false sits somewhat oddly with reaching out to an external VCS host, though that is an annotation-level tension rather than a stated contradiction.

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?

Two sentences with the action front-loaded and zero filler. The endpoint path is useful for humans but partially redundant with the named parameters, which keeps it from a 5.

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?

For a seven-required-parameter mutation with no output schema, the description is thin: it never mentions that the call is a preview unless confirm=true, what the preview returns, or how failures from the VCS provider surface. The action, side effect, and provider scope are covered, so it is viable but leaves operationally important behavior for the agent to discover from the schema alone.

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 all nine parameters including confirm and url_template are already self-describing. The description adds only the REST path, which loosely maps organization_id/project_id/branch_id to URL segments, and never explains provider-specific meaning of repository versus url or when number applies. Baseline 3 is appropriate when the schema carries the parameter burden.

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 uses a specific verb and resource ("Link a branch to a pull request") and names the concrete side effect ("post its status comment") plus the supported providers. It does not differentiate from adjacent siblings such as branch.register, branch.merge, or links.create, so an agent must infer which tool owns PR-linking versus generic branch registration.

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 when-to-use or when-not-to-use guidance and no mention of alternatives. An agent cannot tell from the text whether to call this versus branch.register or links.create when a branch already exists but lacks PR metadata, nor what prerequisites (existing branch, PR already opened on the VCS host) are required.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources