Skip to main content
Glama

Live: diff view

live_diff_view
Read-only

Visualize changes made by a live mutation with an annotated before/after diff overlay, highlighting the changed region and current selection.

Instructions

Produce a FOCUSED, annotated before/after visual diff of a live operation.

When to use: visualizing what one live mutation changed. To produce a mutation to diff use live_apply_to_selection / live_insert_svg / live_set_selected_text (or live_session_step, which calls this internally).

Key params: operation_id names the Live Operation Record. The tool REUSES the before/after frames the mutation already captured (run_live_mutation persists preview_before / preview_after), pixel-diffs them to a CHANGED-REGION bbox, and emits ONE annotated overlay highlighting it plus the current selection outline (best-effort when a session is connected). Frames are resolved VIA the operation_id (never a raw client path) and sandbox-validated under the live artifacts dir before any bytes are read. Identical-dimension frames required; a size mismatch is a stable error. ARTIFACT-ONLY — no mutation, no Operation Record routing, no approval, no network.

Return shape: LiveDiffResult — a workspace-relative overlay PNG path, the operation_id, the pixel-space changed_bbox (null when the frames are identical), and highlighted_ids; the diff path is linked back onto the record's diff_artifacts.

Example: live_diff_view(operation_id)

Risk class: low (artifact-only; reads + annotates two existing frames, no mutation, no record).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operation_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthYesFrame width in pixels.
heightYesFrame height in pixels.
changed_bboxNoChanged-region bbox in PIXELS (null when frames are identical).
operation_idYesLive Operation Record id this diff was computed for.
artifact_pathYesWorkspace-relative annotated overlay PNG path.
highlighted_idsNoSelection ids whose outline was drawn on the overlay.
Behavior5/5

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

Annotations indicate readOnlyHint=true and destructiveHint=false. The description adds beyond annotations: 'ARTIFACT-ONLY — no mutation, no Operation Record routing, no approval, no network' and 'Risk class: low'. It explains frame resolution via operation_id, sandbox validation, and size mismatch error, providing full behavioral context.

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 well-structured with sections: main purpose, when to use, key params, and details. It is front-loaded and each sentence adds value. Slightly long but appropriate for the complexity; minimal redundancy.

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?

Given the output schema exists (though not shown), the description covers return shape: LiveDiffResult with overlay path, operation_id, changed_bbox, and highlighted_ids. Also explains link to diff_artifacts. No gaps remain.

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?

Only one parameter, operation_id, with 0% schema description coverage. The description adds meaning: 'Key params: `operation_id` names the Live Operation Record' and clarifies frames are resolved via operation_id, never a raw client path. This compensates for lack of schema description.

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 clearly states the tool produces a focused, annotated before/after visual diff of a live operation. It specifies the resource (live operation diff) and action (visual diff), and distinguishes from siblings by noting when to use alternatives like live_apply_to_selection.

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?

Explicitly states 'When to use: visualizing what one live mutation changed.' It also provides alternative tools for producing mutations and mentions that live_session_step calls this internally, giving clear guidance on context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jjjsood/inkscape-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server