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 asset must already exist at users//assets// (the editor's drag-drop, upload_image, create_upload_link, or POST /api/upload-asset/ with the raw bytes and an X-Upload-Name header); 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.5/5.0
Behavior4/5

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

The annotations provide destructiveHint=true but no details; the description adds valuable behavioral context by specifying that only the bitmap changes while id, position, size, animations, and styles are preserved. It also discloses the prerequisite that the asset must already exist in a specific location, which helps the agent understand the operation's constraints beyond the mutation flag.

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?

The description is dense but efficient: three sentences cover the effect, the asset prerequisite, and when to choose this over alternatives. The main purpose is front-loaded, every clause adds information, and there is no filler or repetition of the title.

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?

Given the 4 parameters, a 100%-covered schema, an output schema, and annotations, the description provides all necessary operational context: what is preserved, what changes, how the asset must have been uploaded, and the exact filename value to pass. Nothing an agent needs to safely invoke this tool is missing.

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%, so the schema already documents all four parameters. The description adds a little cross-tool context by telling the agent to pass the `filename` the upload returned and use its `name` as the label, but most of the parameter semantics are already present in the input schema. This matches the baseline for high schema coverage with minor added value.

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?

The description opens with a specific verb and resource: 'Repoint an existing image layer at a different uploaded asset.' It immediately clarifies scope and names what is preserved and what changes, distinguishing it from alternatives like remove_layer + add_image_layer without requiring the agent to inspect sibling 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?

The description explicitly states when to use this tool: 'Use this to swap a layer's image WITHOUT losing its keyframes' and contrasts it with the alternative that would mint a new id and drop animations. It also gives concrete prerequisites (asset must exist at a specific path, pass the returned filename) so an agent knows exactly what must be true before calling.

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