Skip to main content
Glama

Set image filename

set_image_filename
Destructive

Repoint an existing image layer at a different uploaded asset — keeps the layer's id, position, size, animations, and styles; only the bitmap changes. The image must already be uploaded (upload_image for a web URL or a file attached in the chat; the editor for a file from the person's disk); pass the filename the upload returned, and its name as the label. Use this to swap a layer's image WITHOUT losing its keyframes — remove_layer + add_image_layer would mint a new id and drop the animations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoOptional label people see for the layer: pass the upload's returned `name`. Omit to keep the current label; null or an empty string clears it.
filenameYesThe uploaded file's id: the `filename` its upload returned.
elementIdYesImage layer id, image.<id>.
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. Changed2 schema fields changed
    • changedInput schema / properties / filename / description
      Previous value: -"Asset filename in the project's assets bucket, e.g. drake.png."New value: +"The uploaded file's id: the `filename` its upload returned."
    • addedInput schema / properties / name
      Added value: +{
      +  "description": "Optional label people see for the layer: pass the upload's returned `name`. Omit to keep the current label; null or an empty string clears it.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. 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: -[
      -  "elementId",
      -  "filename",
      -  "projectId",
      -  "anonymousToken"
      -]New value: +[
      +  "elementId",
      +  "filename",
      +  "projectId"
      +]
  3. 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"
      +}
  4. 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: -[
      -  "elementId",
      -  "filename",
      -  "projectId"
      -]New value: +[
      +  "elementId",
      +  "filename",
      +  "projectId",
      +  "anonymousToken"
      +]
  5. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations mark this as a write with destructiveHint=true; the description adds the essential nuance that the mutation is narrowly scoped – the bitmap is replaced but id, position, size, animations and styles survive. It also discloses the prerequisite chain (upload_image for a web URL or chat attachment, the editor for a local file), which the annotations cannot convey.

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 action and its scope, followed by the prerequisite and the sibling comparison. No filler, and every clause carries distinct information.

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?

Annotations cover the safety profile, the schema is fully documented, and an output schema exists, so the description need not explain returns. What remains – what gets preserved, where the asset must come from, and why not to use the remove/add pair – is all present.

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 the baseline is 3, and the description adds provenance semantics the schema lacks: `filename` must be the value the upload returned, and `name` should be that upload's returned name as the label. That clarifies real ambiguity about where these strings come from.

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 precise verb and resource – repointing an existing image layer at a different uploaded asset – and specifies the exact scope of change (id, position, size, animations, styles preserved; only the bitmap changes). It also names the sibling route (remove_layer + add_image_layer) it is meant to replace, so the agent can distinguish it without opening the 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 gives when-to-use ('swap a layer's image WITHOUT losing its keyframes') and why-not the alternative ('would mint a new id and drop the animations'), plus the prerequisite that the asset must already be uploaded. The agent has a decision rule, not an inference.

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