Skip to main content
Glama

Export Image

photopea_export_image

Export the active Photopea document as a flattened PNG, JPG, WebP, PSD, or SVG file to a local path. Create or open a document first, then save the final image.

Instructions

Export the active document to a file and save it to the local filesystem. The entire document is flattened and exported in the chosen format. Use create_document or open_file to set up the document before exporting.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "format": "<format>",
      "outputPath": "<outputPath>"
    },
    "name": "photopea_export_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatYesOutput format: 'png' for lossless, 'jpg' for compressed photos, 'webp' for web, 'psd' for Photoshop, 'svg' for vector
qualityNoCompression quality for JPG and WebP (1 = smallest file, 100 = best quality). Ignored for other formats.
outputPathYesAbsolute local file path where the exported file will be saved (e.g. /Users/me/output.png)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.1
    • changedInput schema / properties / quality / description
      Previous value: -"Compression quality for JPG format only (1 = smallest file, 100 = best quality). Ignored for other formats."New value: +"Compression quality for JPG and WebP (1 = smallest file, 100 = best quality). Ignored for other formats."
  2. Changed3 schema fields changedv0.1.1
    • changedInput schema / properties / format / description
      Previous value: -"Export format"New value: +"Output format: 'png' for lossless, 'jpg' for compressed photos, 'webp' for web, 'psd' for Photoshop, 'svg' for vector"
    • changedInput schema / properties / outputPath / description
      Previous value: -"Local file path where the export should be saved"New value: +"Absolute local file path where the exported file will be saved (e.g. /Users/me/output.png)"
    • changedInput schema / properties / quality / description
      Previous value: -"JPEG quality (1-100, only for jpg)"New value: +"Compression quality for JPG format only (1 = smallest file, 100 = best quality). Ignored for other formats."
  3. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only declare safety flags (readOnly=false, destructive=false, idempotent=false, openWorld=false); the description adds substantive behavior beyond that: the document is flattened, so layer structure is lost, and the file is written to the local filesystem. It stops short of stating whether an existing file at outputPath is overwritten, which matters for a non-idempotent write.

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?

Three short sentences, front-loaded with the core action, with the prerequisite last. The opening clause 'Export ... to a file and save it to the local filesystem' is slightly redundant since export to a file implies saving, but nothing is wasteful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A three-parameter tool with complete schema coverage and a clear flatten-on-export caveat; the essential invocation information is present. With no output schema, a note on what the call returns (e.g. the written path) and overwrite semantics would close the remaining gap.

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?

Schema description coverage is 100% and the enum for 'format' is fully self-documenting, so the schema already carries parameter meaning. The description only alludes to 'the chosen format' and says nothing about the 'quality' parameter's applicability or the path constraints, so it adds no semantics beyond the schema baseline.

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 ('Export the active document to a file') and a concrete destination ('local filesystem'). No sibling tool performs export, so an agent can route here unambiguously from the name plus this sentence.

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?

Explicit prerequisite is given: 'Use create_document or open_file to set up the document before exporting,' naming the two sibling tools that establish state. It does not say when not to use it (e.g. versus photopea_batch_process for bulk exports) or how it interacts with close_document afterwards.

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