Skip to main content
Glama

Opsphere — DevOps & SRE Intelligence

Diff completo de un PR

bb_pr_diff
Read-only

Get the changed content of all files in a Pull Request as unified diff (patch). Includes added and removed lines per file. For file list and statistics only, use bb_pr_diffstat.

Input Schema

NameRequiredDescriptionDefault
prIdYesNúmero de PR
repoYesRepo slug
workspaceNo
context_idNoOptional explicit Connection Hub work context (ctx_*). Omit to use the conversation's active workspace; global Hub tools ignore it.

Output Schema

NameRequiredDescriptionDefault
okYes
dataYes
contractVersionYes
dataSchemaVersionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed21 schema fields changed
    • changedOutput schema / properties / data / additionalProperties
      Previous value: -trueNew value: +false
    • removedOutput schema / properties / data / properties / count
      Removed value: -{
      -  "type": "number"
      -}
    • addedOutput schema / properties / data / properties / family
      Added value: +{
      +  "const": "bitbucket",
      +  "type": "string"
      +}
    • addedOutput schema / properties / data / properties / gaps
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • removedOutput schema / properties / data / properties / issues
      Removed value: -{
      -  "$ref": "#/properties/data/properties/items"
      -}
    • removedOutput schema / properties / data / properties / items
      Removed value: -{
      -  "items": {
      -    "additionalProperties": true,
      -    "properties": {},
      -    "type": "object"
      -  },
      -  "type": "array"
      -}
    • removedOutput schema / properties / data / properties / maxResults
      Removed value: -{
      -  "type": "number"
      -}
    • removedOutput schema / properties / data / properties / nextPageToken
      Removed value: -{
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
    • addedOutput schema / properties / data / properties / operation
      Added value: +{
      +  "const": "bb_pr_diff",
      +  "type": "string"
      +}
    • addedOutput schema / properties / data / properties / partial
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / data / properties / records
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "additions": {
      +        "type": "number"
      +      },
      +      "author": {
      +        "type": "string"
      +      },
      +      "body": {
      +        "type": "string"
      +      },
      +      "conclusion": {
      +        "type": "string"
      +      },
      +      "createdAt": {
      +        "type": "string"
      +      },
      +      "deletions": {
      +        "type": "number"
      +      },
      +      "environment": {
      +        "type": "string"
      +      },
      +      "facts": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "name": {
      +              "type": "string"
      +            },
      +            "value": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "number"
      +                },
      +                {
      +                  "type": "boolean"
      +                },
      +                {
      +                  "type": "null"
      +                },
      +                {
      +                  "items": {
      +                    "type": [
      +                      "string",
      +                      "number",
      +                      "boolean",
      +                      "null"
      +                    ]
      +                  },
      +                  "type": "array"
      +                }
      +              ]
      +            }
      +          },
      +          "required": [
      +            "name",
      +            "value"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "id": {
      +        "type": "string"
      +      },
      +      "key": {
      +        "type": "string"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "ref": {
      +        "type": "string"
      +      },
      +      "repository": {
      +        "type": "string"
      +      },
      +      "sha": {
      +        "type": "string"
      +      },
      +      "status": {
      +        "type": "string"
      +      },
      +      "summary": {
      +        "type": "string"
      +      },
      +      "tags": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "title": {
      +        "type": "string"
      +      },
      +      "type": {
      +        "type": "string"
      +      },
      +      "updatedAt": {
      +        "type": "string"
      +      },
      +      "url": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "facts"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • removedOutput schema / properties / data / properties / results
      Removed value: -{
      -  "$ref": "#/properties/data/properties/items"
      -}
    • removedOutput schema / properties / data / properties / startAt
      Removed value: -{
      -  "type": "number"
      -}
    • addedOutput schema / properties / data / properties / summary
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / data / properties / total / minimum
      Added value: +0
    • changedOutput schema / properties / data / properties / total / type
      Previous value: -"number"New value: +"integer"
    • addedOutput schema / properties / data / properties / truncated
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / data / properties / warnings
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / data / required
      Added value: +[
      +  "family",
      +  "operation",
      +  "records",
      +  "total",
      +  "partial",
      +  "truncated",
      +  "warnings",
      +  "gaps"
      +]
    • addedOutput schema / properties / dataSchemaVersion
      Added value: +{
      +  "const": 2,
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "contractVersion",
      -  "ok",
      -  "data"
      -]New value: +[
      +  "contractVersion",
      +  "dataSchemaVersion",
      +  "ok",
      +  "data"
      +]
  2. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so safety is covered. The description adds that output is per-file with added and removed lines, but doesn't disclose truncation limits, size caps, or rate-limit behavior for very large PRs, which is the main residual risk here.

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?

Three short sentences, front-loaded with the core purpose, followed by format detail, then the sibling redirect. Nothing is redundant.

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

Completeness4/5

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

An output schema exists, so return-value explanation isn't required, and read-only annotations cover the safety profile. The definition is sufficient to call correctly; only a note about large-diff/truncation behavior is 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 coverage is 75% (repo and prId documented; workspace undocumented), and the description adds nothing about parameter meaning, range of prId, or how workspace/context_id interacts. With high-but-not-complete coverage, the schema carries the load and a baseline 3 is appropriate.

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?

Specific verb ('Get'), resource ('changed content of all files in a Pull Request'), and concrete output format ('unified diff (patch)') are stated. It explicitly distinguishes itself from bb_pr_diffstat so the agent can route correctly without opening a schema.

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

Usage Guidelines4/5

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

It names the alternative sibling bb_pr_diffstat and the condition that selects it ('file list and statistics only'), which is a genuinely useful routing hint. It stops short of stating prerequisites (repo access/auth) or when a large PR might produce unmanageable output.

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