set_post_body
Replace a draft's body with a Substack structured document to add headings, lists, links, code blocks, images, buttons, or a paywall; pass the draft id and body to confirm stored nodes.
Instructions
replace the body of a draft with a Substack document. This is the only way to write structured content — headings, lists, links, code blocks, images, buttons and a paywall. Create the draft first with create_draft_post, then call this with its id. The result reports how many nodes of each type were stored, so a caller can confirm that what it asked for is there. An image must already be hosted by Substack: this cannot upload one.
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": {
"draft_id": "<draft_id>",
"body": "<body>"
},
"name": "set_post_body"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | The post body as a Substack ProseMirror document. | |
| draft_id | Yes | The numeric id of the draft to write, as returned by list_posts (`id`) or create_draft_post (`draft_id`). |