Attach uploaded media to a post
attach_mediaUse when adding a finalized owner mediaId to a working post. Read the post revision first. Images, videos, audio and voice become media blocks; documents become file blocks. Does not publish or change existing delivery snapshots.
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": {
"postId": "<postId>",
"mediaId": "<mediaId>",
"expectedRevision": "<expectedRevision>"
},
"name": "attach_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| postId | Yes | Owner-bound postId from search_posts/search_post_drafts/create_post_draft. | |
| mediaId | Yes | Owner-bound mediaId returned by finalize_media_upload. | |
| expectedRevision | Yes | Current revision from get_post/last mutation. On conflict reread and compare changes; never bypass revision. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| message | Yes |