Skip to main content
Glama

Fetch the actual pixels of a story image

render_diff_image
Read-onlyIdempotent

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

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.
projectIdNoThe project to look in (a projectId from list_projects). Needed only when you can access several projects; a buildId already names its project.
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 / 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"
      +}
  2. 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"
      +}
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only cover the read-only/idempotent safety profile, and the description adds real operational context: it returns inline base64 requiring a rendering MCP client, it errors when no image exists (new stories have no baseline), and unresolved review comments attach a text note pointing at list_comments. None of this is derivable from the annotations or schema.

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 the single most important fact (inline pixels, not a URL) before any schema talk, and essentially every sentence carries actionable information. The cost is a dense run-on paragraph with heavy capitalization that is harder to scan than a bulleted form, though there is no true filler.

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 an 8-parameter tool with a nested pagination object and no output schema, the description covers both addressing modes, pagination rationale, error conditions, and the review-comment side effect. An agent has enough to select and invoke it without guessing.

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; the description goes further by explaining cross-parameter semantics the schema cannot - that `which` is ignored for the storyId form, that pxPagination is ignored for before_after, and that projectId is only needed with multiple projects. It adds addressing-mode context rather than restating field docs.

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 plus the exact return format: an inline base64 image, explicitly 'not a URL'. It distinguishes itself from sibling get_diff (whose URLs are the fallback in constrained clients) and from get_build/list_build_stories as sources of the ids it consumes.

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 branching: form (1) diffResultId+which for changed stories, form (2) build selector+storyId for any story including unchanged ones, and calls out before_after as 'usually what you want for a code change'. It also names when-not (raw curl pipe is useless) and the alternative (get_diff's URLs).

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