Skip to main content
Glama

Get Preview

photopea_get_preview
Read-onlyIdempotent

Returns a downscaled PNG snapshot of the active document without modifying it, so you can visually check layout, colors, and text before exporting.

Instructions

See the active document: returns a PNG snapshot, downscaled to maxSize, so you can check layout, colors and text visually. The document is not modified. Call it after visual changes, before exporting.

Input Schema

NameRequiredDescriptionDefault
maxSizeNoLongest side of the preview in pixels; smaller documents are not upscaled

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare the safety profile (readOnly, idempotent, non-destructive), and the description adds useful behavior: it returns a downscaled PNG snapshot and does not modify the document. The 'not modified' statement is somewhat redundant with readOnlyHint, but the snapshot and scaling details add value beyond 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?

Two sentences with no wasted wording. The return format and scaling are front-loaded, followed by the document-safety note and usage timing.

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 simple read-only, one-parameter preview tool, the description covers purpose, return format, scaling behavior, and when to use it. No output schema exists, but the description is sufficient to understand what the tool returns.

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

Parameters3/5

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

With one parameter and 100% schema description coverage, the schema already fully documents maxSize, including default, range, and no-upscaling behavior. The description only reiterates 'downscaled to maxSize' and adds no parameter semantics beyond the schema.

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 action and resource ('See the active document'), the return format ('PNG snapshot'), scaling behavior ('downscaled to maxSize'), and the visual use case. It also implicitly distinguishes itself from export by saying to call it before exporting.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit timing guidance: 'after visual changes, before exporting.' It does not name alternatives such as photopea_get_document_info or photopea_export_image, but the usage context is clear.

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