Skip to main content
Glama

Get per-story diff detail with image URLs

get_diff
Read-onlyIdempotent

Per-story diff detail for a build (resolved by commitSha/prNumber/buildId). Returns diff metrics and presigned URLs for the baseline, candidate, and diff PNGs. By default they stay valid for one to two hours: download them to a file now, do not link them anywhere a person will open later. To put before/after images in a PR comment, pass embed: true together with the storyId of each story going into the comment: those URLs last 7 days and render in GitHub (without storyId a whole-build read mints a 7-day link for every changed story, so keep embed for the few you will post). They also stop rendering after 7 days, so link the build's dashboard page too, as a full URL on the host this MCP server is served from: /builds/, with buildId from get_build. Defaults to the changed stories; pass storyId for one specific story. When that storyId is an UNCHANGED story it returns its baseline (diffResultId null, changed false, the baseline URL as both baselineUrl and candidateUrl) - the story rendered identical to baseline, so there is no before/after pair to embed for it. Use render_diff_image instead when you want the actual pixels inline for a vision model, not a URL. When AI review is on, each diff carries the judge's call: aiVerdict (intended|regression), aiConfidence, aiSummary (what changed), aiReasoning, and aiFlagReason; all null when AI review didn't run for it. Each diff also carries comments {total, unresolved} for THAT story - unresolved>0 means an open review note; read the thread with list_comments before accepting.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
embedNotrue: return URLs that stay valid for 7 days, for embedding in a GitHub PR comment. Default: URLs valid for one to two hours, for downloading now.
buildIdNoResolve this exact build id.
storyIdNoLimit to one story id.
prNumberNoResolve the latest build for this PR number.
commitShaNoResolve the build for this git commit SHA.
projectIdNoThe project to look in (a projectId from list_projects). Needed only when you can access several projects; a buildId already names its project.

Output Schema

NameRequiredDescriptionDefault
noteNoPresent when this is UI Verify's demo project rather than one of yours; says how to set up your own.
diffsYes
openReviewCommentsNoPresent when open review comments are waiting on some branch of this project; read yours with list_comments.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / embed
      Added value: +{
      +  "description": "true: return URLs that stay valid for 7 days, for embedding in a GitHub PR comment. Default: URLs valid for one to two hours, for downloading now.",
      +  "type": "boolean"
      +}
  2. Changed1 schema field changed
    • addedOutput schema / properties / openReviewComments
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Present when open review comments are waiting on some branch of this project; read yours with list_comments.",
      +  "properties": {
      +    "branches": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "branch": {
      +            "type": "string"
      +          },
      +          "lastActivityAt": {
      +            "type": "string"
      +          },
      +          "open": {
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "branch",
      +          "open",
      +          "lastActivityAt"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "branchesTotal": {
      +      "type": "number"
      +    },
      +    "hint": {
      +      "type": "string"
      +    },
      +    "projectId": {
      +      "type": "string"
      +    },
      +    "total": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "total",
      +    "branches",
      +    "branchesTotal",
      +    "projectId",
      +    "hint"
      +  ],
      +  "type": "object"
      +}
  3. Changed3 schema fields changed
    • addedOutput schema / properties / diffs / items / properties / comments / description
      Added value: +"Absent on UI Verify's demo project, whose review comments only its team sees."
    • changedOutput schema / properties / diffs / items / required
      Previous value: -[
      -  "diffResultId",
      -  "storyId",
      -  "viewport",
      -  "browser",
      -  "changed",
      -  "decision",
      -  "metrics",
      -  "baselineUrl",
      -  "candidateUrl",
      -  "diffUrl",
      -  "aiSummary",
      -  "aiVerdict",
      -  "aiConfidence",
      -  "aiReasoning",
      -  "aiFlagReason",
      -  "comments"
      -]New value: +[
      +  "diffResultId",
      +  "storyId",
      +  "viewport",
      +  "browser",
      +  "changed",
      +  "decision",
      +  "metrics",
      +  "baselineUrl",
      +  "candidateUrl",
      +  "diffUrl",
      +  "aiSummary",
      +  "aiVerdict",
      +  "aiConfidence",
      +  "aiReasoning",
      +  "aiFlagReason"
      +]
    • addedOutput schema / properties / note
      Added value: +{
      +  "description": "Present when this is UI Verify's demo project rather than one of yours; says how to set up your own.",
      +  "type": "string"
      +}
  4. Changed1 schema field changed
    • addedInput schema / properties / projectId
      Added value: +{
      +  "description": "The project to look in (a projectId from list_projects). Needed only when you can access several projects; a buildId already names its project.",
      +  "format": "uuid",
      +  "type": "string"
      +}
  5. Changed2 schema fields changed
    • addedOutput schema / properties / diffs / items / properties / comments
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "total": {
      +      "type": "number"
      +    },
      +    "unresolved": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "total",
      +    "unresolved"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / properties / diffs / items / required
      Previous value: -[
      -  "diffResultId",
      -  "storyId",
      -  "viewport",
      -  "browser",
      -  "changed",
      -  "decision",
      -  "metrics",
      -  "baselineUrl",
      -  "candidateUrl",
      -  "diffUrl",
      -  "aiSummary",
      -  "aiVerdict",
      -  "aiConfidence",
      -  "aiReasoning",
      -  "aiFlagReason"
      -]New value: +[
      +  "diffResultId",
      +  "storyId",
      +  "viewport",
      +  "browser",
      +  "changed",
      +  "decision",
      +  "metrics",
      +  "baselineUrl",
      +  "candidateUrl",
      +  "diffUrl",
      +  "aiSummary",
      +  "aiVerdict",
      +  "aiConfidence",
      +  "aiReasoning",
      +  "aiFlagReason",
      +  "comments"
      +]
  6. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "diffs": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "aiConfidence": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "aiFlagReason": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "aiReasoning": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "aiSummary": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "aiVerdict": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "baselineUrl": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "browser": {
      +            "type": "string"
      +          },
      +          "candidateUrl": {
      +            "type": "string"
      +          },
      +          "changed": {
      +            "type": "boolean"
      +          },
      +          "decision": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "diffResultId": {
      +            "anyOf": [
      +              {
      +                "format": "uuid",
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "diffUrl": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "metrics": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "bbox": {
      +                "anyOf": [
      +                  {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "height": {
      +                        "type": "number"
      +                      },
      +                      "width": {
      +                        "type": "number"
      +                      },
      +                      "x": {
      +                        "type": "number"
      +                      },
      +                      "y": {
      +                        "type": "number"
      +                      }
      +                    },
      +                    "required": [
      +                      "x",
      +                      "y",
      +                      "width",
      +                      "height"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "changedPct": {
      +                "type": "number"
      +              },
      +              "changedPx": {
      +                "type": "number"
      +              },
      +              "changedPxAdjusted": {
      +                "type": "number"
      +              },
      +              "flakinessPx": {
      +                "type": "number"
      +              },
      +              "flakinessScore": {
      +                "type": "number"
      +              },
      +              "hadBaseline": {
      +                "type": "boolean"
      +              },
      +              "height": {
      +                "type": "number"
      +              },
      +              "sizeChanged": {
      +                "type": "boolean"
      +              },
      +              "threshold": {
      +                "type": "number"
      +              },
      +              "width": {
      +                "type": "number"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "storyId": {
      +            "type": "string"
      +          },
      +          "viewport": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "diffResultId",
      +          "storyId",
      +          "viewport",
      +          "browser",
      +          "changed",
      +          "decision",
      +          "metrics",
      +          "baselineUrl",
      +          "candidateUrl",
      +          "diffUrl",
      +          "aiSummary",
      +          "aiVerdict",
      +          "aiConfidence",
      +          "aiReasoning",
      +          "aiFlagReason"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "diffs"
      +  ],
      +  "type": "object"
      +}
  7. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only say readOnly/idempotent/openWorld=false; the description carries the real behavior: URL lifetimes (1-2 hours vs 7 days with embed), that embed without storyId mints 7-day links for every changed story, the required dashboard fallback link after 7 days, and the unchanged-storyId return shape (diffResultId null, changed false, same URL in both fields). It further documents the AI-review fields and their all-null state when review didn't run.

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?

Front-loaded with purpose and return values, then user-facing caveats, then alternatives and edge cases in reasonable order. It is dense and parenthesis-heavy with some long compound sentences, but nearly every clause carries operational guidance rather than restating structured fields.

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

Completeness5/5

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

For a read tool with six optional parameters and an output schema, it covers the decision space an agent needs: link lifetimes, embedding rules, the unchanged-story case, the AI verdict fields and their null state, and the comment counts with the follow-up tool named. Nothing required to call it correctly or interpret the result is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not: embed's tradeoff and blast radius, storyId's special semantics for unchanged stories, and that projectId is only needed when several projects are accessible because buildId already names its project. Slight overlap with the schema's own embed wording keeps it from a 5.

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?

Opens with a specific resource and scope: 'Per-story diff detail for a build (resolved by commitSha/prNumber/buildId)', and states exactly what comes back: diff metrics plus presigned baseline/candidate/diff PNG URLs. It also draws the boundary against the nearest sibling: 'Use render_diff_image instead when you want the actual pixels inline for a vision model, not a URL.'

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?

Gives explicit when-to-use branches: default build read for changed stories, storyId for one story, embed:true only for stories going into a PR comment, and list_comments when unresolved>0. It also states when-not: keep embed for the few you post, and do not link default URLs anywhere a person will open later.

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