Skip to content

Writing blog posts

Blog posts work like pages, with a few extras: categories, tags, a featured image, sticky posts and scheduling. A typical request:

Write a post announcing our new opening hours. Put it in News, tag it “store”, and schedule it for Monday at 9 am.

  1. It checks what exists. list-posts and search-content show the posts already on the site, so it doesn’t repeat one; list-terms returns your categories and tags with their IDs.
  2. It reuses terms. It picks existing categories and tags. Only if one is missing does it create it with save-term, which returns the existing term instead of duplicating it if the name is already taken. Creating terms needs an Editor or an Administrator.
  3. It saves the post. save-post creates it as a draft unless the AI sets another status. To schedule it, it sets the status to future with a date in the site’s timezone.
  4. You review it. Open the edit_url to check the post in the editor.

As with pages, updating needs the content_hash from get-post or from the previous save-post. The hash also covers categories, tags, the sticky flag and the date: if someone changed any of them in the meantime, the update is rejected with content_conflict and the AI reads the post again.

The post tools need edit_posts, but connecting at all needs a user who can edit pages: an Editor or an Administrator.