frame_diff
View > Frame Difference as numbers (and optionally an image): which pixels a frame changed compared with the frame before it, to find parts of a character that "stuck" or tore during a walk cycle (onion skin shows where the previous frame was, this shows what did not move with the rest). Counts c...
This record as markdown: /tools/pixmith-mcp/frame-diff.md
What frame_diff does on Pixmith
AI agents call frame_diff to retrieve information from Pixmith without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
all | boolean | — | Every frame of the document (a table of rows, no image). |
doc | string | — | Document id (see doc_list); optional when only one document is open. |
wrap | boolean | — | The frame before frame 0 is the last frame (default true; false = frame 0 has no reference). |
frame | integer | — | Frame to compare with the one before it (default: the active frame). |
image | boolean | — | Also return the difference tinted over the frame as an image (a single frame only). |
layer | object | — | Compare only this layer's cel (index or name) instead of the composite of the visible layers. |
scale | integer | — | image: integer upscale (default auto). |
frames | array | — | Several frames: one result row each, no image (max 4096). Overrides `frame`. |
opacity | number | — | image: opacity of the tint, 0.1-1 (default 0.65). |
background | string | — | image: "checker" (default), "transparent" or a color. |
Parameters from the server's own tool schema.
Why frame_diff is rated Low
Even though frame_diff only reads data, uncontrolled read access leaks sensitive information and racks up API costs: an agent caught in a retry loop can make thousands of calls a minute without anyone noticing.
Risk signalsHigh parameter count (10 properties) · Bulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
The rule that runs frame_diff safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Pixmith, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For frame_diff, this is the rule to start with:
frame_diff is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Pixmith, apply this rule, and every frame_diff call is checked against it from then on.
Questions about frame_diff
View > Frame Difference as numbers (and optionally an image): which pixels a frame changed compared with the frame before it, to find parts of a character that "stuck" or tore during a walk cycle (onion skin shows where the previous frame was, this shows what did not move with the rest). Counts changed (visible in both frames but a different color or alpha), appeared (transparent before), disappeared (transparent now), their total, bounds {x, y, w, h} around all of them (null when the frames match) and reference_frame (the frame compared against). The frame before frame 0 is the last frame when wrap=true (default; right for looping animations), none when wrap=false (then every count is 0). Compares the composite of the visible layers, or only the cel of layer (hidden layers count). Give frames or all=true for a table over many frames without images; image=true returns the difference tinted over the frame (magenta changed, green appeared, red disappeared). render with diff_prev=true draws the same overlay on any render. Never changes the document. It is categorised as a Read tool in the Pixmith MCP Server, which means it retrieves data without modifying state.
frame_diff accepts 10 parameters: all, doc, wrap, frame, image, layer, scale, frames, opacity, background. The full parameter table on this page comes from the server's own tool schema.
Register the Pixmith MCP server in PolicyLayer and add a rule for frame_diff: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Pixmith. Nothing to install.
frame_diff is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the frame_diff rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for frame_diff. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
frame_diff is provided by the Pixmith MCP server (pixmith-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Pixmith, and thousands of servers like it.
This server
Across the catalogue