Write a blog post
put_postCreate or update a blog post exactly as given: the Markdown is saved as written, no AI rewrites it, and the site's blog layout draws it in the site's design at /blog/. A new post starts as a Draft; use publish_post to make it Live. To update a post, read it with get_post or list_posts and pass its contentHash as base_hash: the write is refused if the post changed since. Needs setup_blog first. Raw HTML in the Markdown is dropped; images need an http(s) URL, such as one upload_image returned.
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": {
"siteId": "<siteId>",
"slug": "<slug>",
"title": "<title>",
"markdown": "<markdown>"
},
"name": "put_post"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Publication date, YYYY-MM-DD. Posts are listed newest first. | |
| slug | Yes | The post's URL name, e.g. "how-we-price" for /blog/how-we-price. Lowercase words joined by hyphens. | |
| image | No | The post's main picture: an http(s) URL, e.g. from upload_image. | |
| title | Yes | The post's title. | |
| author | No | Who wrote it, shown on the post if the layout does. | |
| siteId | Yes | The site (id from list_sites). | |
| markdown | Yes | The post's body in Markdown (GitHub flavoured), without the title, which the layout shows. | |
| base_hash | No | Required to update an existing post: its contentHash from get_post or list_posts. Omit it to create a new post. | |
| image_alt | No | What the picture shows, for screen readers. Required with image. | |
| collection | No | Which collection the posts are in. Defaults to "blog", so posts are at /blog/<slug>. Lowercase words joined by hyphens. | |
| description | No | One or two sentences for the list of posts and search results. The first paragraph if omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | Yes | ||
| path | Yes | The post's path on the site, e.g. "/blog/launch". | |
| slug | Yes | ||
| siteId | Yes | ||
| status | Yes | Draft or Live (published). Live means the next site publish includes the post; it is not on the domain until the site is published (publish_post does that once the site has an active domain, as does Publish in Simplepages). | |
| changed | Yes | False when the post already said exactly this. | |
| created | Yes | ||
| editUrl | Yes | Opens the post's page in the Simplepages editor. | |
| liveUrl | No | Its address on the site's custom domain, once the site is published. Null without a domain. | |
| collection | Yes | ||
| previewUrl | No | Shareable preview link, Draft or Live. Null until its page row exists. | |
| contentHash | Yes | The saved post's version. Pass it to put_post as base_hash to update this post. | |
| previewCurrent | Yes | Whether previewUrl already shows this version. |