Skip to main content
Glama

Write alt text

write_alt_text

Ask AI for the alt text and a suggested file name of a finished image, for example one compressed with alt_text false or whose alt text failed. A written one can be asked again in another language. It counts one against the account's daily AI alt texts, unless an image with the same bytes already has one in that language. Then call get_image until alt_text.status is no longer pending.

Input Schema

NameRequiredDescriptionDefault
idYesThe image's id.
alt_text_languageNoThe language to write the alt text in, as a language tag. English ("en") by default. The suggested file name follows it for languages written in the Latin alphabet and is in English otherwise.
use_suggested_nameNoRename the optimized copy to the suggested file name as soon as the alt text arrives, unless it already has a new name by then. Off by default.

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. Added

TDQS

A4/5.0
Behavior3/5

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

Annotations already signal a non-destructive write (readOnlyHint=false, destructiveHint=false), so the safety profile is covered. The description adds genuinely useful context beyond that: quota consumption (one daily AI alt text, waived if identical bytes already have that language) and the asynchronous pending-status polling requirement. However, it omits what happens to existing alt text and error behavior.

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

Conciseness4/5

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

Front-loads the core action and packs quota and polling details into four tight sentences. Some phrasing is awkward ('A written one can be asked again in another language'), but nothing is padded.

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?

Output schema exists so return values need no explanation, and the description still supplies the async polling loop, quota cost, and dedup rule an agent needs to call and follow up correctly. Nothing material is missing for a 3-parameter write tool.

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 id, alt_text_language (including default and enum), and use_suggested_name. The description hints at language re-runs and a suggested file name but adds no syntax or default detail beyond the schema, so baseline 3 applies.

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 (write/ask AI for) and resource (alt text plus suggested file name) for a finished image, and distinguishes itself from siblings like compress_images and rename_image by targeting already-completed images lacking alt text. An agent can identify the action without opening the schema.

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 explicit triggering conditions: use for images compressed with alt_text false or whose alt text failed, and re-ask in another language. It also prescribes the follow-up flow ('call get_image until alt_text.status is no longer pending'). It stops short of naming when-not-to-use or pointing at rename_image as the alternative for the suggested-name 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