Get WordPress Media Item
wp_get_media_itemGet full metadata for a media item by ID, including dimensions, file size, MIME type, alt text, caption, and source URL.
Instructions
Fetch a single media item by ID. Returns full metadata including dimensions, file size, MIME type, alt text, caption, and source URL.
Args:
id (number): Numeric media item ID.
response_format (enum): markdown | json. Default 'markdown'.
Returns: A single WPMediaItem object.
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>"
},
"name": "wp_get_media_item"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Numeric media item ID. | |
| response_format | No | Output format: 'markdown' for human-readable, 'json' for machine-readable. | markdown |