Skip to main content
Glama

Rename an image

rename_image
Idempotent

Change the name a finished image's optimized copy downloads under, for example to an SEO-friendly name like "red-running-shoes". The extension is always the delivered format's, so a typed one is dropped. The original keeps the name it was sent with.

Input Schema

NameRequiredDescriptionDefault
idYesThe image's id.
nameYesThe new name, without an extension.

Output Schema

NameRequiredDescriptionDefault
idNoThe image's id.
hintNoWhat to do next, when the status alone does not say.
nameNoThe name the optimized copy downloads under.
folderNoThe folder it was sent with, which a zip puts it in. Null for an image on its own.
statusNo
scan_idNoThe page scan that found it, if one did.
alt_textNoThe AI alt text, or null when none was asked for.
originalNo
settingsNo
optimizedNoNull until the image has finished.
share_urlNoIts public page, once shared.
created_atNo
responsiveNoThe responsive sizes (paid plans), or null when none were asked for. list_images carries only their status.
source_urlNoThe address it was fetched from: its address on the scanned page, or the url it was sent as. Null for a file.
updated_atNo
saved_bytesNoNegative when the optimized copy is larger.
saved_percentNo
size_limit_statusNoAgainst settings.size_limit: under, resized (made smaller in pixels to fit) or over. Null without a limit, and until the image has finished.
content_credentialsNoThe Content Credentials (a signed C2PA record of where the image came from) the file sent carried, or null when it carried none, and until the image has finished.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / responsive / description
      Previous value: -"The responsive sizes (Pro), or null when none were asked for. list_images carries only their status."New value: +"The responsive sizes (paid plans), or null when none were asked for. list_images carries only their status."
  2. Changed7 schema fields changed
    • addedOutput schema / properties / content_credentials
      Added value: +{
      +  "description": "The Content Credentials (a signed C2PA record of where the image came from) the file sent carried, or null when it carried none, and until the image has finished.",
      +  "properties": {
      +    "generative_ai": {
      +      "description": "Whether they say generative AI made the image, as they state it; the signature is not checked.",
      +      "type": "boolean"
      +    },
      +    "status": {
      +      "description": "removed: the optimized copy no longer carries them. kept: the optimized copy is the file that was sent, unchanged.",
      +      "enum": [
      +        "removed",
      +        "kept"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "generative_ai"
      +  ],
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / folder
      Added value: +{
      +  "description": "The folder it was sent with, which a zip puts it in. Null for an image on its own.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / responsive
      Added value: +{
      +  "description": "The responsive sizes (Pro), or null when none were asked for. list_images carries only their status.",
      +  "properties": {
      +    "download_url": {
      +      "description": "A zip of every width, once ready. Works without a token for an hour. Not in list_images.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "files": {
      +      "description": "Each width, narrowest first, once ready. Not in list_images.",
      +      "items": {
      +        "properties": {
      +          "download_url": {
      +            "description": "Works without a token for an hour.",
      +            "type": "string"
      +          },
      +          "height": {
      +            "type": "integer"
      +          },
      +          "name": {
      +            "description": "The name it downloads under, which html uses.",
      +            "type": "string"
      +          },
      +          "size": {
      +            "description": "Bytes.",
      +            "type": "integer"
      +          },
      +          "width": {
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "width",
      +          "height",
      +          "size",
      +          "name",
      +          "download_url"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "html": {
      +      "description": "An <img srcset> naming the files, once ready. Not in list_images.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "status": {
      +      "description": "pending: being made, a few seconds after the image is completed or already-optimized. ready: every width is made. failed: none was kept; compress it again with responsive_widths. skipped: an animation gets none.",
      +      "enum": [
      +        "pending",
      +        "ready",
      +        "failed",
      +        "skipped"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status"
      +  ],
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / settings / properties / responsive_widths
      Added value: +{
      +  "description": "The responsive widths asked for, or null.",
      +  "items": {
      +    "type": "integer"
      +  },
      +  "type": [
      +    "array",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / settings / properties / size_limit
      Added value: +{
      +  "description": "The most the optimized copy may weigh, in KB of 1,000 bytes, or null.",
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / settings / required
      Previous value: -[
      -  "level",
      -  "format",
      -  "keep_metadata",
      -  "width",
      -  "height",
      -  "scale"
      -]New value: +[
      +  "level",
      +  "format",
      +  "keep_metadata",
      +  "width",
      +  "height",
      +  "scale",
      +  "size_limit",
      +  "responsive_widths"
      +]
    • addedOutput schema / properties / size_limit_status
      Added value: +{
      +  "description": "Against settings.size_limit: under, resized (made smaller in pixels to fit) or over. Null without a limit, and until the image has finished.",
      +  "enum": [
      +    "under",
      +    "resized",
      +    "over",
      +    null
      +  ],
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  3. Changed1 schema field changed
    • addedOutput schema / properties / alt_text
      Added value: +{
      +  "description": "The AI alt text, or null when none was asked for.",
      +  "properties": {
      +    "language": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "status": {
      +      "description": "pending: being written, a few seconds after the image is completed or already-optimized; it waits for a retry while the image is failed or cancelled. written: ready. failed: ask again with write_alt_text. skipped: the day's AI alt texts were used up.",
      +      "enum": [
      +        "pending",
      +        "written",
      +        "failed",
      +        "skipped"
      +      ],
      +      "type": "string"
      +    },
      +    "suggested_name": {
      +      "description": "A descriptive file name without an extension, for rename_image.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "text": {
      +      "description": "One sentence for the image's alt attribute, once written.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "text",
      +    "language",
      +    "suggested_name"
      +  ],
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
  4. Changed1 schema field changed
    • addedOutput schema / properties / source_url
      Added value: +{
      +  "description": "The address it was fetched from: its address on the scanned page, or the url it was sent as. Null for a file.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  5. Changed2 schema fields changed
    • addedOutput schema / properties / settings / properties / format
      Added value: +{
      +  "description": "The format asked for, or null when none was sent. auto stays auto after the image finishes.",
      +  "enum": [
      +    "auto",
      +    "webp",
      +    "avif",
      +    "png",
      +    "jpg",
      +    null
      +  ],
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / settings / required
      Previous value: -[
      -  "level",
      -  "keep_metadata",
      -  "width",
      -  "height",
      -  "scale"
      -]New value: +[
      +  "level",
      +  "format",
      +  "keep_metadata",
      +  "width",
      +  "height",
      +  "scale"
      +]
  6. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "created_at": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "hint": {
      +      "description": "What to do next, when the status alone does not say.",
      +      "type": "string"
      +    },
      +    "id": {
      +      "description": "The image's id.",
      +      "type": "string"
      +    },
      +    "name": {
      +      "description": "The name the optimized copy downloads under.",
      +      "type": "string"
      +    },
      +    "optimized": {
      +      "description": "Null until the image has finished.",
      +      "properties": {
      +        "download_url": {
      +          "description": "Works without a token for an hour.",
      +          "type": "string"
      +        },
      +        "format": {
      +          "type": "string"
      +        },
      +        "height": {
      +          "type": "integer"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "size": {
      +          "description": "Bytes.",
      +          "type": "integer"
      +        },
      +        "width": {
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "format",
      +        "size",
      +        "width",
      +        "height",
      +        "download_url"
      +      ],
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "original": {
      +      "properties": {
      +        "download_url": {
      +          "description": "Works without a token for an hour.",
      +          "type": "string"
      +        },
      +        "format": {
      +          "type": "string"
      +        },
      +        "height": {
      +          "type": "integer"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "size": {
      +          "description": "Bytes.",
      +          "type": "integer"
      +        },
      +        "width": {
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "format",
      +        "size",
      +        "width",
      +        "height",
      +        "download_url"
      +      ],
      +      "type": "object"
      +    },
      +    "saved_bytes": {
      +      "description": "Negative when the optimized copy is larger.",
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "saved_percent": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "scan_id": {
      +      "description": "The page scan that found it, if one did.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "settings": {
      +      "properties": {
      +        "height": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "keep_metadata": {
      +          "type": "boolean"
      +        },
      +        "level": {
      +          "enum": [
      +            "none",
      +            "lossless",
      +            "ultra",
      +            "smart",
      +            null
      +          ],
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "scale": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "width": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "level",
      +        "keep_metadata",
      +        "width",
      +        "height",
      +        "scale"
      +      ],
      +      "type": "object"
      +    },
      +    "share_url": {
      +      "description": "Its public page, once shared.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "status": {
      +      "enum": [
      +        "queued",
      +        "optimizing",
      +        "completed",
      +        "failed",
      +        "already-optimized",
      +        "cancelled"
      +      ],
      +      "type": "string"
      +    },
      +    "updated_at": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  7. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare idempotent=true and destructive=false, but the description adds real behavior beyond them: the extension is forced to the delivered format and any typed extension is dropped, and the original's name is untouched. It omits any mention of auth requirements or what happens if the image isn't yet finished, which is why it isn't a 5.

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?

Three short sentences, front-loaded with the primary action, then two constraint sentences that each carry new information (extension handling, original unaffected). No repetition of the title and nothing wasted.

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 two-parameter mutation with an output schema, the description covers what changes, what stays the same, and how the name argument is normalized. The only soft spot is the unstated prerequisite/error behavior if the image has no finished optimized copy, which the phrase 'finished image's optimized copy' only implies.

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?

With 100% schema coverage the baseline is 3, but the description goes further by explaining the consequence of passing an extension despite the schema's 'without an extension' note — it is silently dropped in favor of the delivered format. That resolves ambiguity the schema alone leaves open.

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 (rename) and precise resource scope: the download name of a finished image's optimized copy, not the image itself. The closing line 'The original keeps the name it was sent with' separates it cleanly from sibling mutations like delete_image or get_image.

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?

Gives a concrete motivating use case ('an SEO-friendly name like "red-running-shoes"') and implicitly scopes usage to finished images with an optimized copy. It stops short of stating when not to use it or naming an alternative tool, so it lands at clear-context-but-no-exclusions.

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