Create a draft
create_draftCreates a new draft in an Entry's Writing from the text given: an article, post or note, with a Markdown body (## headings, lists, > quotes, code blocks; a block opened withprompt is a prompt for the reader to copy; a line of its own such as is an embed card, and
is a picture already added to the draft). Every field is optional, and each field's limit is stated in its schema. The draft stays private until the owner publishes it. Shown to the owner as a draft preview. Requires the drafts:write scope. Publishing, unpublishing and changes to the live profile are made only by the owner, in Entry.
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": {
"entryId": "<entryId>"
},
"name": "create_draft"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dek | No | A one-line standfirst under the title. At most 280 characters. | |
| body | No | The text, as Markdown: ## headings, - and 1. lists, > quotes, *em*, **strong**, `code`, [links](https://...), [^1] notes and ``` code blocks with an optional language. A block opened with ```prompt is a prompt: shown labelled, with a Copy button, for the reader to paste into an assistant. A picture or an embed is one line of its own: . The target is image:<key> for a picture added to this draft with the add-image call (POST /v1/me/entries/{entryId}/drafts/{draftId}/images, or the add_draft_image tool, which answers the key and this line), or just an https address: an X post (x.com/<handle>/status/<id>), a GitHub repository (github.com/<owner>/<repo>), a YouTube or Vimeo video, or a link to a video file ending .mp4, .m4v, .webm or .mov, which becomes a card or a video. An embed line needs only the address (); Entry reads the card itself. The description is the alt text. A post holds at most 3 pictures on the Free plan and 30 on Pro, and at most 20 embeds and videos together; a picture key that is not this draft's is refused. At most 60,000 characters. | |
| title | No | The draft's title, on one line. Leave it out for a note without a title. At most 80 characters. | |
| topics | No | Topics, as short words: at most 3 topics, each at most 32 characters. | |
| entryId | Yes | The Entry's id (starts with ent_), as returned by list_entries. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Only when the call failed (isError): the error code, e.g. conflict, forbidden, not_found, validation_failed, rate_limited. | |
| draft | No | ||
| details | No | Only when the call failed: conflict has revision, forbidden has requiredScope, rate_limited has retryAfter (seconds), validation_failed has problems; a refused page bundle has errors (code, path, detail, fix for each) and a stale page revision has revision. | |
| message | No | Only when the call failed: what went wrong and what to do. | |
| problems | No | Fields that were refused when the others were applied: { field: reason }. |