Skip to main content
Glama

Fetch the actual pixels of a story image

render_diff_image
Read-only

Fetch a story's image as an INLINE image (base64 pixels, not a URL) so a vision model can look at it directly. Needs a native MCP client that renders image content; piped through raw curl it is useless (use get_diff's URLs there instead). Two ways to address it: (1) diffResultId + which for a CHANGED story - which is baseline|candidate|diff (the triptych) or before_after, the baseline and candidate SIDE BY SIDE (before on the left, after on the right) cropped to the changed region - and when a story changed in SEVERAL far-apart places, one such crop PER region stacked top to bottom, so a header-plus-footer change is two tight crops, not a page-tall image. before_after is usually what you want for a code change - it zooms to what moved instead of a full page. Get diffResultId from get_build (changedStories[].diffResultId) or get_diff. (2) a build selector (commitSha|prNumber|buildId) + storyId for ANY story's current image - the candidate if it changed this build, else its baseline. This second form is the only way to see an UNCHANGED/passed story's pixels (list them via list_build_stories status=unchanged), so you can confirm 'identical to baseline'. Errors if the image doesn't exist (a genuinely new story has no baseline, so no before_after either). When the story has unresolved review comments, a text note saying so comes with the image: read them with list_comments before you accept.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
whichNoFor the diffResultId form: baseline|candidate|diff (one triptych image, default candidate), or before_after (baseline+candidate side by side, cropped to the change - one crop per changed region, stacked, when the change spans several places). Ignored for the storyId form.
buildIdNoResolve this exact build id.
storyIdNoWith a build selector: fetch THIS story's current image (works for unchanged stories).
prNumberNoResolve the latest build for this PR number.
commitShaNoResolve the build for this git commit SHA.
diffResultIdNoA CHANGED story's diff result id (from get_build/get_diff); pair with `which`.
pxPaginationNoPaginate a TALL image slice by slice instead of one unreadable image: return the `height` device px starting at y=`offset`, so a 5000px page is reviewed in readable slices. Omit for the whole image. Ignored for the before_after form (already cropped to the change).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / pxPagination
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Paginate a TALL image slice by slice instead of one unreadable image: return the `height` device px starting at y=`offset`, so a 5000px page is reviewed in readable slices. Omit for the whole image. Ignored for the before_after form (already cropped to the change).",
      +  "properties": {
      +    "height": {
      +      "default": 500,
      +      "description": "Slice height in device px (default 500).",
      +      "exclusiveMinimum": 0,
      +      "type": "integer"
      +    },
      +    "offset": {
      +      "description": "Top y (device px) of the slice to return.",
      +      "minimum": 0,
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "offset"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations establish readOnlyHint=true, and the description adds valuable behavioral context beyond that: the output requires a native MCP client, before_after returns cropped/side-by-side/stacked crops, unresolved comments trigger a text note, and missing baselines cause errors. No contradiction with readOnlyHint exists.

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?

The description is long but organized into numbered addressing modes, a usage recommendation, an error caveat, and a comment-handling note. Nearly every sentence earns its place; it only misses a perfect score because the volume of detail makes it somewhat dense.

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 7-parameter tool with nested objects and no output schema, the description covers rendering environment, both invocation forms, return behavior (inline image plus optional text note), error conditions, and sibling-tool routing. An agent has enough context to invoke it correctly.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds meaning beyond the schema: it explains that diffResultId pairs with `which`, that before_after crops per changed region, that pxPagination is ignored for before_after, and that diffResultId comes from get_build or get_diff. This materially helps an agent choose and populate parameters correctly.

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 leads with a specific verb-resource pair: 'Fetch a story's image as an INLINE image (base64 pixels, not a URL)' and immediately differentiates it from get_diff by contrasting inline pixels vs. URLs. It also explains the two invocation forms, making the tool's purpose unmistakable.

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?

The description gives explicit when-to-use guidance: 'piped through raw curl it is useless (use get_diff's URLs there instead)' and 'before_after is usually what you want for a code change'. It also states the second form is 'the only way to see an UNCHANGED/passed story's pixels' and directs the agent to list_build_stories and list_comments.

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