Skip to main content
Glama

update_asset_alt

Idempotent

Set (overwrite) an image asset's alt text — the description screen readers announce and search engines index. Alt text belongs to the ASSET, not to a page: every page showing the image picks up the change, and set_field/update_content…

Instructions

Set (overwrite) an image asset's alt text — the description screen readers announce and search engines index. Alt text belongs to the ASSET, not to a page: every page showing the image picks up the change, and set_field/update_content cannot set it. documentId is the asset's (from list_assets or an upload), not a page's; an unknown one is refused as not found. Describe what the image shows in one sentence; use "" only for a purely decorative image. Returns the updated asset with its new alt. assist_writing cannot write alt text (it needs the image itself), so look at the image and write it. Requires the content.update permission (Admin, Editor, Author — an Author only within their own sections).

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": {
      "documentId": "<documentId>",
      "alt": "<alt>"
    },
    "name": "update_asset_alt"
  }
}

Input Schema

NameRequiredDescriptionDefault
altYesThe new alt text, e.g. 'Two hikers on a ridge above a fjord at sunset'.
siteNoSite slug or id to act in (multisite). Omit to use this server's default site. Call list_sites to see what exists — an empty tree or search usually means the wrong site, not missing content.
documentIdYesThe asset's documentId from list_assets or an upload result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.3
    • addedInput schema / properties / alt / description
      Added value: +"The new alt text, e.g. 'Two hikers on a ridge above a fjord at sunset'."
    • changedInput schema / properties / documentId / description
      Previous value: -"Content documentId"New value: +"The asset's documentId from list_assets or an upload result."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Adds substantial context beyond annotations: alt text lives on the asset not the page, unknown documentId is refused as not found, the required permission and role scoping, and the return value. Annotations already cover idempotent/non-destructive, and the description reinforces rather than repeats.

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?

Dense but front-loaded with the core action, and nearly every sentence carries distinct information (scope, id semantics, alt conventions, permissions). Slightly long, but little is redundant.

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?

For a 3-param mutation tool with no output schema, it covers permissions, failure behavior, return value, and cross-page effects. An agent has everything needed to call it correctly.

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%, so the baseline is 3, but the description adds real meaning: documentId is the asset's (not a page's) from list_assets/upload, and alt should be one sentence with "" reserved for decorative images. This resolves the main 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 and resource ("Set (overwrite) an image asset's alt text") and immediately distinguishes it from siblings set_field/update_content. An agent knows exactly what this does and what it is not.

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 names the alternatives that cannot do this (set_field/update_content) and the tool that cannot generate the text (assist_writing), with the condition (needs the image itself). Provides the when-to-use routing directly.

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