wp_media_set_alt_text
Update accessibility metadata for WordPress media items: set or clear alt text, edit caption and description. Ideal for bulk SEO improvements.
Instructions
Update accessibility and descriptive metadata of a media item: alt_text (required), caption and description (optional). Useful for bulk SEO improvements on existing media. Empty alt_text is allowed (explicitly clearing).
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": {
"id": "<id>",
"alt_text": "<alt_text>"
},
"name": "wp_media_set_alt_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| caption | No | ||
| alt_text | Yes | ||
| description | No |