Skip to main content
Glama

Opsphere — DevOps & SRE Intelligence

GHE: PR Full Diff

ghe_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 ghe_pr_files.

Input Schema

NameRequiredDescriptionDefault
repoYesRepository name or full owner/name slug. Prefer owner/name when known so routing never depends on a workspace default.
ownerNoOptional GitHub org/user. A full repo slug (owner/name) takes precedence; otherwise the active workspace default org is used.
context_idNoOptional explicit Connection Hub work context (ctx_*). Omit to use the conversation's active workspace; global Hub tools ignore it.
pull_numberYesPull Request number

Output Schema

NameRequiredDescriptionDefault
okYes
dataYes
contractVersionYes
dataSchemaVersionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed19 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 / diff
      Added value: +{
      +  "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 / partial
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / data / properties / pullNumber
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / data / properties / repository
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / data / properties / results
      Removed value: -{
      -  "$ref": "#/properties/data/properties/items"
      -}
    • removedOutput schema / properties / data / properties / startAt
      Removed value: -{
      -  "type": "number"
      -}
    • removedOutput schema / properties / data / properties / total
      Removed value: -{
      -  "type": "number"
      -}
    • 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: +[
      +  "repository",
      +  "pullNumber",
      +  "diff",
      +  "truncated",
      +  "partial",
      +  "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.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=false, so the safety profile is covered. The description adds the output shape (unified diff with added/removed lines), but says nothing about the main operational risk for a diff tool: whether large PRs are truncated, capped, or fail, and whether there is any pagination. That omission matters for a tool that can return very large payloads.

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?

Two sentences, zero waste, and the capability statement is front-loaded ahead of the sibling routing note. Nothing could be removed without losing information.

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 values need not be explained, and the sibling routing is handled. The only meaningful gap is operational behavior on large diffs (truncation/limits), which for a patch-retrieval tool is worth one more sentence.

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 100% and all four parameters (repo, owner, context_id, pull_number) are documented in the schema, including the repo-vs-owner precedence rule. The description adds no parameter-level meaning beyond that, so the baseline of 3 applies.

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?

States a specific verb and resource ('Get the changed content of all files in a Pull Request') and pins the output format ('unified diff (patch)') plus its contents ('added and removed lines per file'). This is clearly distinguishable from ghe_pr_files and ghe_pr_detail without opening any schema.

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

Usage Guidelines5/5

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

Explicitly routes the agent: use this for diff content, use ghe_pr_files when only the file list and statistics are needed. The condition selecting the alternative is stated, not implied, which is exactly the ambiguity an agent faces between these two siblings.

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