Skip to main content
Glama

Write alt text for an image

cloudcdn_ai_alt
Read-only

Generate alt text for one CDN image path with CloudCDN's vision model to support accessibility and SEO.

Instructions

Generate alt text for one image with CloudCDN's vision model, for accessibility or SEO. To check whether an image is safe to publish use cloudcdn_ai_moderate instead; to find images use cloudcdn_assets or cloudcdn_search. Calls GET /api/ai/alt-text and returns its JSON: url (the path sent), alt (the suggested text), model (the vision model), source ("ai" when generated now, "cached" when served from the API's cache), degraded (true for a cached answer) and dateGenerated (ISO 8601). Changes nothing in the catalogue, but the API caches the text per path for 24 hours, so a repeat call returns the same text. Fails: an absolute http(s) URL, or a path containing "..", is rejected (HTTP 400, exit code 69); an image the API cannot fetch, HTTP 404 (exit code 69); the vision model unavailable or its daily budget used up, HTTP 503 (exit code 75 after retries); no valid key, HTTP 401 (exit code 77).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url": "<url>"
    },
    "name": "cloudcdn_ai_alt"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesThe image's path on the CDN, not an absolute URL: the path field from cloudcdn_assets or cloudcdn_search with a leading slash, e.g. "/acme/v1/hero.webp".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.0.24
    • addedInput schema / properties / url / description
      Added value: +"The image's path on the CDN, not an absolute URL: the path field from cloudcdn_assets or cloudcdn_search with a leading slash, e.g. \"/acme/v1/hero.webp\"."
  2. First observedv0.0.23

TDQS

A4.8/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: states nothing in the catalogue changes, that the API caches per path for 24h, and enumerates failure modes with HTTP status and exit codes (400/404/503/401 → 69/69/75/77), including retry behavior before exit 75. The "repeat call returns the same text" wording is consistent with idempotentHint=false because the response envelope still changes (source flips from ai to cached), so no contradiction.

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 purpose, then alternatives, then return shape, then failure modes in a deliberate order. It is dense and a single paragraph, but nearly every clause carries operational value and the length is justified by the missing output schema.

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?

There is no output schema, and the description compensates by enumerating the returned fields (url, alt, model, source, degraded, dateGenerated) including the meaning of source values. Combined with auth/subscription failure info and caching semantics, nothing essential for correct invocation is missing.

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% and the schema already explains the path format with an example, so the baseline is 3. The description earns an extra point by supplying validation constraints absent from the schema: absolute http(s) URLs are rejected and ".." in a path returns HTTP 400.

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 and resource ("Generate alt text for one image") plus the model (CloudCDN's vision model) and the use cases (accessibility, SEO). A reader can distinguish it from the sibling AI tool and from asset-lookup tools without consulting any schema.

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 routes the agent: check publishability with cloudcdn_ai_moderate instead, and find images with cloudcdn_assets or cloudcdn_search. It gives both the positive case (accessibility or SEO) and the alternatives for adjacent intents.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.