Skip to main content
Glama

Place Image

photopea_place_image

Place an image from a URL or local file path into the active Photopea document as a new layer, with optional width, height, and x/y positioning.

Instructions

Place an image into the active document from a URL or local file path. Creates a new layer with the placed image as the active layer. Use width/height to resize while preserving aspect ratio, or x/y to position the layer.

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": {
      "source": "<source>"
    },
    "name": "photopea_place_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNoX position offset in pixels from the left edge
yNoY position offset in pixels from the top edge
nameNoDisplay name for the placed layer in the layers panel
widthNoResize to this width in pixels (preserves aspect ratio if only one dimension is set)
heightNoResize to this height in pixels (preserves aspect ratio if only one dimension is set)
sourceYesURL or absolute local file path of the image to place

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.1.1
    • changedInput schema / properties / height / description
      Previous value: -"Resize to this height in pixels"New value: +"Resize to this height in pixels (preserves aspect ratio if only one dimension is set)"
    • changedInput schema / properties / name / description
      Previous value: -"Name for the placed layer"New value: +"Display name for the placed layer in the layers panel"
    • changedInput schema / properties / source / description
      Previous value: -"URL or local file path of image to place"New value: +"URL or absolute local file path of the image to place"
    • changedInput schema / properties / width / description
      Previous value: -"Resize to this width in pixels"New value: +"Resize to this width in pixels (preserves aspect ratio if only one dimension is set)"
    • changedInput schema / properties / x / description
      Previous value: -"X position offset"New value: +"X position offset in pixels from the left edge"
    • changedInput schema / properties / y / description
      Previous value: -"Y position offset"New value: +"Y position offset in pixels from the top edge"
  2. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Adds real behavior beyond the annotations: a new layer is created and becomes the active layer, and source may be a remote URL (consistent with openWorldHint=true). It does not mention network/auth requirements for URL sources, failure behavior, or that the placement mutates document state in a non-idempotent way, which annotations already flag.

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 action and source, then the side effect, then parameter hints. No filler, though the last sentence largely restates schema descriptions.

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 six-parameter, non-destructive, open-world placement tool with no output schema, the description covers source, resulting layer, and sizing/positioning options adequately. Only the return value (e.g., new layer identity) is unaddressed, which is acceptable without an output schema.

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% and already documents every parameter's meaning and units. The description adds only a short usage hint about width/height (aspect ratio) versus x/y (positioning), which is marginal value over the schema.

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?

States a specific verb and resource ('Place an image into the active document') plus the side effect of creating a new active layer, which separates it from photopea_add_layer and photopea_open_file. It never names those siblings explicitly, so differentiation is inferred rather than stated.

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

Usage Guidelines3/5

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

Implies the context ('into the active document') and implies that a document must already be open, but gives no explicit when-to-use/when-not guidance and does not point to photopea_open_file for loading files versus placing image content.

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