compose_post
Create or update Ghost posts from structured Koenig content blocks to produce clean, natively editable content instead of raw HTML; use inline blocks or a JSON block file for long posts.
Instructions
Create or update a Ghost post from structured Koenig content blocks (paragraphs, headings, lists, callouts, images, buttons, etc.). PREFER THIS over use_ghost_api with raw html/lexical — it produces clean, natively-editable posts. Pass blocks inline for short posts, or write them to a JSON file and pass blockFile (absolute path) for long posts. Omit id to create, set id+updated_at to update. Call koenig_help to discover block types and fields.
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": "compose_post"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Post ID to update. Omit to create a new post. | |
| slug | No | Custom URL slug | |
| tags | No | Tags to assign (by id or name) | |
| title | No | Post title (required when creating a new post) | |
| blocks | No | Ordered content blocks (inline). Prefer native blocks (paragraph/heading/list/quote) and cards over raw html. Prose `text` supports inline **bold**, _italic_, `code`, [links](url). Use koenig_help to discover block fields. For long posts, write the blocks to a JSON file and pass `blockFile` instead. | |
| status | No | Post status (default draft) | |
| excerpt | No | Custom excerpt (maps to custom_excerpt) | |
| blockFile | No | Absolute path to a local JSON file containing the blocks — either a bare array `[...]` or `{ "blocks": [...] }`. Use this for long posts: compose/edit the file (validating with compose_lexical), then pass the path instead of re-sending the whole array. Provide exactly one of `blocks` or `blockFile`. Writing to an absolute path under tmp/ is recommended. | |
| updated_at | No | Required when updating (id set): the post's current updated_at, for collision detection. Get it via posts.read. | |
| visibility | No | public, members, paid, or tiers | |
| feature_image | No | Feature image URL |