Add a file
attach_mediaGives a link for the person to add an image, a video or a PDF to a draft in their browser, because you can't read files on their computer. The link opens that draft ready for a file: they add it and press Save changes, which saves it on the draft as a new version, and approving there is optional. For several drafts that need files, pass draft_ids: the same link opens the next one after each Save, so it's one trip. Use it when a post needs a file, such as Instagram. Don't re-encode a file the person gave you unless they ask. If you're making a video yourself, get_publishing_context's video_format goes straight through. Attach whatever there is, and PostReach converts it. When they're back, call open_review: it shows the new version, with each file's media_id. A file that's already in PostReach can go on another post by passing its media_id in media_ids to create_draft or update_draft, with no link. Example: draft_id "drf_1".
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "attach_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| draft_id | No | ||
| draft_ids | No | Several drafts, such as a week of photo posts: one link opens each in turn, so the person adds every file in one trip |