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

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoThe image's id.
hintNoWhat to do next, when the status alone does not say.
nameNoThe name the optimized copy downloads under.
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
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

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +  ]
      +}
  2. 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"
      +  ]
      +}
  3. 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"
      +]
  4. 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"
      +}
  5. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources