Skip to main content
Glama

Fill Placeholder

photopea_fill_placeholder

Insert an image into a template placeholder by scaling it to cover or fit, centering it, and masking it to the placeholder shape for photo frames, mockups, and social templates.

Instructions

Put an image into a template's placeholder layer: the image is scaled to cover (or fit inside) the placeholder's bounds, centered on it, placed above it and masked to its shape. Use it for photo frames, device mockups and social post templates; use edit_text to swap the template's text.

Input Schema

NameRequiredDescriptionDefault
fitNo'cover' fills the placeholder and crops overflow, 'contain' fits the whole image inside itcover
maskNoMask the image to the placeholder's shape (a layer mask, so layers added later can't break it)
nameNoDisplay name for the new image layer
sourceYesURL or absolute local file path of the image
placeholderYesPlaceholder layer name (string) or index (number), e.g. a shape or pixel layer marking where the image goes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.1

TDQS

A4/5.0
Behavior4/5

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

Annotations declare a non-read-only, non-idempotent, open-world write, and the description adds real behavioral detail beyond them: the image is scaled to the placeholder bounds, centered, stacked above the placeholder, and masked to its shape. The mask parameter note explains that the layer mask survives later layer additions, which is genuine consequence disclosure. It does not flag that each call creates a new layer or what happens on a failed URL fetch.

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, front-loaded with the core operation before the use-case routing. Nothing is redundant given annotations and schema, and no sentence could be cut without losing information.

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?

For a five-parameter write tool with full schema coverage, annotations, and no output schema, the description covers the essential behavior and its main alternative. The remaining gap is the unaddressed overlap with place_image and no mention of failure behavior when the source URL or placeholder is invalid.

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 coverage is 100%, so every parameter including the fit enum and mask default is already documented in the schema. The description reinforces the visible effect of fit and mask but introduces no syntax, format, or edge-case guidance (e.g., what 'contain' does when the image is smaller than the placeholder) beyond the schema. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a precise verb-plus-resource statement: put an image into a template's placeholder layer, with the exact transform chain (scale, center, place above, mask). It explicitly separates itself from edit_text for the text-swapping case, but never mentions the very similarly named photopea_place_image sibling, which is the most likely source of mis-selection.

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?

It gives concrete use cases (photo frames, device mockups, social post templates) and names edit_text as the alternative for text edits, which is a clear routing signal. It stops short of saying when not to use it — specifically, when to reach for place_image instead of a placeholder fill.

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