Edit CMS content and publish
Have your agent draft and update CMS items, up to 100 per call, then publish, schedule or unpublish them with your approval.
On this page
Your site's blog posts and other collections live in Willo's CMS, not in the site's code. Your agent can read them with any token, and write and publish them with a read + act token. Writing is free and never touches the live site. Publishing needs your approval.
Read what is there
willo_content lists the items in a collection: id, slug, status, dates, and each item's content score with its finding codes. The default collection is blog. Pass item_id to read one item in full: its Markdown body, its keywords, and its score with every finding, what it means and a ready instruction to fix it. Ask for an unknown collection and the result names the site's real collections.
An item's status is its own: draft, scheduled or published. That is separate from the site's draft branch. A published post stays live while the site's code is being drafted.
Read the content rules first
Your site can have content rules: your guidance on voice, images, approvals and cadence, plus the categories and tags already in use. When rules exist, the willo_content listing says so in its first line. Have your agent call willo_content_rules (pass collection for that collection's section) before it writes, and reuse the listed terms.
To change the rules, the agent calls willo_content_rules_write with a scope (site or a collection name) and the whole new text, written under the headings the tool lists so each part shows in its own box on the Content tab. It always needs your approval: the card shows the old and new text.
Write a draft
Prompt: "Write a blog post about our autumn opening hours, about 400 words, in the voice of our other posts."
The agent calls willo_content_write with a title and body_md, plus optional description, author, tags, seo_keywords and collection-specific fields. For a blog post, fields also takes image (the featured image), imageAlt and seo (title, description, canonical, noindex, ogImage), each overriding the page's default. To change an existing item it passes the item_id and only the fields to change.
A draft's web address comes from its title. The agent can set it with slug (lowercase letters, numbers and hyphens, unique in the collection). A published or scheduled item's address is changed by a person, in the Content tab or in Willo's chat, because the change moves a live page.
willo_content_write always writes a draft item, never the live site, and the owner is told a draft is waiting. No card is needed. A value shaped like a secret is refused, as everywhere. The result gives the item's new content score and the findings still open.
Edit part of a post
Prompt: "Fix the typo in the second paragraph of the sauna stones post, and add the photo under the Choosing stones heading."
To change part of a body, the agent sends body_edits with the item_id instead of the whole body_md: up to 20 {find, replace} pairs, each at most 20,000 characters, applied in order. Each find is exact text that appears exactly once in the item's current body. Windows line breaks count as plain ones, and the saved body uses plain ones. replace: "" deletes it. To insert, find a nearby line and replace it with itself plus the new text: find the heading line ## Choosing stones\n and replace it with the same line, a blank line, then the new paragraph or image.
If any find matches nothing or more than one place, nothing is saved. The result names that edit, how many matches it found and the text around each, so the agent can lengthen the find and retry. Text the edits don't touch stays as it is, including changes made in the editor since the agent read the post. body_edits works in items too, and every edit is kept in the item's history.
Add images
Prompt: "Make a featured image and two section pictures for the sauna-stones post."
The agent calls willo_images with up to four images. Each is source: "ai" with a prompt (a new picture) or source: "stock" with a short query (a royalty-free photo), plus an optional purpose and alt. The images are saved to the business's Assets and come back with their addresses and descriptions in the order asked. The agent then puts them in the post with willo_content_write: fields.image and fields.imageAlt for the featured image, and body_edits to insert the rest under their headings.
willo_images is the one tool here that uses credits. Each call is charged once, by what its images cost to make (a stock-only call is 0.25 credits), and shows as AI image in the credit history. Images that fail aren't charged; a business whose AI images keep failing or being turned down is paused from making more for up to an hour (too_many_failures), and one call at a time makes images for a business. A business without enough credits gets an insufficient_credits error before anything is made, and on Free the 10-a-day image limit applies. AI requests are checked before anything is made: no real people, no fake proof, no other brands' marks. A call that takes longer than 20 seconds returns running with a request id; willo_get_approval with that id gives the result. More in Generate and edit images.
A long post gets its pictures after the text is written: one willo_images call for the featured image and the body images, then one willo_content_write that sets fields.image and fields.imageAlt and inserts the body images with body_edits. From 600 words, add about one body image per two or three sections, at most three, never above the opening paragraph. When a saved post is missing pictures or descriptions, the result says what is missing and gives that next step.
Which image addresses a post can use
Every picture a write saves is checked: the featured image, seo.ogImage and each image in the body.
- An address from
willo_imagesorwillo_assetsis used as it is. - A site path such as
/images/stones.jpg, or an address on the business's own domain, must be a file in the site's code (willo_list_filesshows them). - Any other
httpsimage is copied into the business's Assets, and the post points at the copy. Each item copies at most 3, each call at most 30, and each business at most 50 an hour and 200 MB a day. - An address on a stock-photo site is refused: get the photo with
willo_images(source: "stock"). So is an Assets address that isn't this business's.
If any address can't be used, nothing is saved and the result names each one with what to do instead. dry_run: true copies nothing. Addresses an item already had aren't checked again, so an older post keeps its pictures when you edit it.
Improve the content score
Every item with its own page has a content score from 0 to 100, made only of findings the owner can fix: a missing search description, a post under 300 words, no links to other pages on the site, a picture with no description. Each finding is marked fix, improve or tip. Nothing blocks publishing.
Prompt: "Find the blog posts with no search description and write one for each."
The agent calls willo_content with needs_attention set to description_missing (or true for any finding, or fix for the ones to fix first), reads each item, and writes the fixes as draft edits with willo_content_write. Publishing them needs your approval, and one card can cover all of them (see below).
Keywords. seo_keywords takes the main keyword first, then up to four related ones, which may be questions: at most 5, each up to 80 characters. The score then checks the main keyword in the search title, the search description, the opening paragraph and a section heading, and flags it when it is repeated too often. Keywords stay with the item and are never written into the page. An empty list clears them.
Notes for the owner. Where a post needs a fact the agent doesn't have, write [Owner: what to add]. The score flags every note left in the text until someone replaces it.
Publish, schedule or unpublish
willo_content_publish changes what the live site shows for one item (item_id) or for up to 100 (item_ids). It always needs your approval, and none of its actions has an undo card.
action | What happens on the live site |
|---|---|
publish | The item goes live now. |
publish with publish_at | The item is scheduled and goes live at that time. |
unpublish | The item's page comes off the site and its address redirects to the collection's main page. |
delete | The item is removed; its address redirects the same way. |
redirect_to with unpublish or delete names a different page on the site for the old address to send visitors to, such as the post that replaces it. The result says exactly what the address does; on a site without a redirect host it returns "not found" instead. The redirect takes effect within a few minutes of the change going live.
Many items at once
Write. willo_content_write takes items: up to 100 entries (2 MB) per call, each with the single-item arguments. Entries without item_id create drafts, entries with one update that item; one call is all creates or all updates. Every entry is checked first, and if one fails nothing is written and the result lists each failure by position. dry_run: true checks a batch without writing it. You get one notice for the whole batch.
Publish. item_ids on willo_content_publish acts on up to 100 items in one site update, under one card. The card lists the first ten with their addresses, the rest behind Show all, and what happens at their addresses, such as "12 will redirect".
Every item is checked before the card. If one can't go (fields to fix, a conflicting site edit, not published, used by other content), nothing changes and the call returns batch_blocked with each reason. Fix them and resend, or resend with skip_invalid: true: the card then says "Publish 37 of 40", names the 3 left out, and the approval covers exactly those 37. A batch is one call and one change against your limits.
Search settings of other pages
An item's search settings are its seo fields. For a page of your site that is not a CMS item, such as the home or about page, your agent uses willo_page_meta and willo_page_meta_write: see Page titles and descriptions.
Content in the site's code
Some sites keep pages or posts as files in the code, not in the CMS. Those show in willo_list_files, and the agent edits them like any other file. They go live with the next publish of the site's draft, not with willo_content_publish.
Ask Willo instead
For posts written from the business brief, or a content calendar, hand Willo a task. The same approvals apply.
Related: willo_content_rules, willo_content_write, willo_content_publish.