Skip to main content
Glama

Add image layer

add_image_layer

Add an image layer. The image must already be uploaded: upload_image takes a web URL or a file attached in the chat, and a file from the person's disk is uploaded in the editor. Every upload returns { filename, name, width, height }: pass filename (the stored file's id) here, and name as the layer's label. SIZE THE BOX TO THE PICTURE: pass width alone (or height alone) and the other side is filled from the image's own aspect, so the picture is never stretched; a box with both sides that does not match the image's aspect stretches the picture to fill it. To duplicate an existing layer, reuse its filename — the editor auto-assigns a fresh id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesCentre x in 1080-wide base coords.
yYesCentre y in 1920-tall base coords.
nameNoOptional label people see in the Inspector and Timeline: pass the upload's returned `name`. Without it the layer is labelled by an older project's own filename, or by kind; never by a stored id.
blockNoOPTIONAL timeline window — {start, duration} in composition frames. OMIT IT (the default) and the layer is ALWAYS PRESENT: a persistent overlay that holds for the whole composition, which is what an agent-placed watermark / lower-third almost always wants. Pass it to place a bounded CLIP instead (what the editor's own add does: 5 s at the playhead). Keyframes on a blocked layer are sampled RELATIVE to `start`.
widthNoWidth in px (> 0). Omit it to derive it from `height` and the image's aspect.
heightNoHeight in px (> 0). Omit it to derive it from `width` and the image's aspect; the usual call passes `width` alone.
filenameYesThe stored filename an upload returned (an id such as 3f2a9c1e-….png, or an older project's own name).
projectIdYesOpaque project id (a v4 UUID, from list_projects/create_project). Selects which existing project this call mutates.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesWhether the call succeeded.
dataNoThe payload, shaped by the tool.
noteNoWhat to do next when not ready.
errorNoWhy it failed.
statusNoFor cache-backed readers: whether the answer was ready.
editorUrlNoOpens this project in the editor.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / height / description
      Previous value: -"Height in px (must be > 0)."New value: +"Height in px (> 0). Omit it to derive it from `width` and the image's aspect; the usual call passes `width` alone."
    • changedInput schema / properties / width / description
      Previous value: -"Width in px (must be > 0)."New value: +"Width in px (> 0). Omit it to derive it from `height` and the image's aspect."
    • changedInput schema / required
      Previous value: -[
      -  "filename",
      -  "x",
      -  "y",
      -  "width",
      -  "height",
      -  "projectId"
      -]New value: +[
      +  "filename",
      +  "x",
      +  "y",
      +  "projectId"
      +]
  2. Changed2 schema fields changed
    • changedInput schema / properties / filename / description
      Previous value: -"Asset filename in the project's assets bucket, e.g. star.png."New value: +"The stored filename an upload returned (an id such as 3f2a9c1e-….png, or an older project's own name)."
    • addedInput schema / properties / name
      Added value: +{
      +  "description": "Optional label people see in the Inspector and Timeline: pass the upload's returned `name`. Without it the layer is labelled by an older project's own filename, or by kind; never by a stored id.",
      +  "type": "string"
      +}
  3. Changed2 schema fields changed
    • removedInput schema / properties / anonymousToken
      Removed value: -{
      -  "description": "The token create_anonymous_account returned. This connection has no Morpha key, so every call carries it.",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "filename",
      -  "x",
      -  "y",
      -  "width",
      -  "height",
      -  "projectId",
      -  "anonymousToken"
      -]New value: +[
      +  "filename",
      +  "x",
      +  "y",
      +  "width",
      +  "height",
      +  "projectId"
      +]
  4. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "The result envelope every Morpha tool returns.",
      +  "properties": {
      +    "data": {
      +      "description": "The payload, shaped by the tool.",
      +      "type": [
      +        "object",
      +        "array",
      +        "string",
      +        "number",
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "editorUrl": {
      +      "description": "Opens this project in the editor.",
      +      "type": "string"
      +    },
      +    "error": {
      +      "description": "Why it failed.",
      +      "type": "string"
      +    },
      +    "note": {
      +      "description": "What to do next when not ready.",
      +      "type": "string"
      +    },
      +    "ok": {
      +      "description": "Whether the call succeeded.",
      +      "type": "boolean"
      +    },
      +    "status": {
      +      "description": "For cache-backed readers: whether the answer was ready.",
      +      "enum": [
      +        "ready",
      +        "not-ready"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  5. Changed2 schema fields changed
    • addedInput schema / properties / anonymousToken
      Added value: +{
      +  "description": "The token create_anonymous_account returned. This connection has no Morpha key, so every call carries it.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "filename",
      -  "x",
      -  "y",
      -  "width",
      -  "height",
      -  "projectId"
      -]New value: +[
      +  "filename",
      +  "x",
      +  "y",
      +  "width",
      +  "height",
      +  "projectId",
      +  "anonymousToken"
      +]
  6. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover readOnly=false, destructive=false, openWorld=false, so the bar is lower. The description still adds valuable behavior: the aspect-preserving sizing rule (passing both non-matching sides stretches the picture), and the auto-assigned fresh id when duplicating. It doesn't state permissions or what happens on an invalid/missing filename, but the sizing-stretch warning is exactly the kind of trap an agent needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and prerequisite, which is good. But the block/name/filename semantics are partially duplicated from the already-detailed schema descriptions, and the all-caps 'SIZE THE BOX TO THE PICTURE' plus repeated aspect explanation adds bulk. It's informative but not tightly trimmed.

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 an 8-param, nested-object, mutation tool with an output schema, the description covers the key traps: upload prerequisite, filename-vs-name mapping, aspect-based sizing, and duplication. The `block` default (persistent overlay vs bounded clip) is left entirely to the schema, but the output schema means return values needn't be explained. Mostly complete.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description nonetheless adds semantics beyond the schema: it maps the upload's returned `filename` to the stored id and `name` to the label, and clarifies that passing width alone derives the other side. The duplication-by-filename trick is a meaning-level addition not in 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 verb and resource ('Add an image layer') and distinguishes itself from siblings by explaining the upload prerequisite via upload_image versus reusing an existing filename to duplicate. An agent can tell this apart from add_shape, add_text_layer, or upload_image without opening schemas.

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 names upload_image as the prerequisite and its two input modes, and gives the alternative path for duplicating an existing layer by reusing its filename. The 'usual call passes width alone' guidance, mirrored in the schema, adds a clear default behavior.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources