Skip to main content
Glama

Get per-story diff detail with image URLs

get_diff
Read-only

Per-story diff detail for a build (resolved by commitSha/prNumber/buildId). Returns diff metrics and presigned, time-limited URLs (download them to a file, or link them in a PR comment) for the baseline, candidate, and diff PNGs. 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. 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
diffsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +]
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description reveals important behavior: the URLs are time-limited and intended for download/PR comments, an unchanged story returns baseline URLs and null diffResultId, AI-review fields are null when review did not run, and unresolved comment counts signal open review notes. None of this contradicts the annotations.

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?

The description is long but information-dense, with each clause covering a distinct behavior: core returns, default selection, the unchanged-story edge case, the sibling alternative, AI fields, and comment semantics. It is front-loaded with the primary purpose and contains no filler or repeated schema text.

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-only diff tool with an output schema and readOnlyHint annotation, the description covers all the behavior an agent needs to call it correctly: resolution options, story selection, unchanged-story handling, the alternative tool, AI-review payload details, and a related review workflow. The only minor omission is resolution-parameter precedence, which does not make the definition inadequate.

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 description coverage is 100%, so the baseline is 3, and the description still adds real meaning for storyId by explaining the default-to-changed-stories behavior and the unchanged-story response. However, it does not specify precedence or mutual exclusivity among commitSha, prNumber, and buildId when more than one is provided, so the extra value is good but not complete.

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?

The description opens with a specific verb-plus-resource statement ('Per-story diff detail for a build') and enumerates the exact returned artifacts: diff metrics and presigned, time-limited URLs for baseline, candidate, and diff PNGs. This clearly separates it from siblings such as render_diff_image, which is explicitly named.

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?

It explicitly says to use render_diff_image instead when inline pixels are needed for a vision model, and it gives a concrete selection rule for storyId: default to changed stories or pass a specific story. It also directs the agent to list_comments when unresolved comments are present, which is useful post-call guidance.

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.