ai_assist
Run the CMS writing assistant on text to generate SEO meta, summaries, translations, rewrites, or variants. Result is returned but not saved—write it back with set_field or update_content.
Instructions
Run the CMS's writing assistant on a piece of text and return the result — it does NOT save anything; write the output yourself with set_field/update_content. Uses the model configured in Settings → AI (Anthropic or OpenAI-compatible). Without a configured model only meta_title, meta_description and summarize work (a basic truncation); the other tasks return an error saying so. Image alt text is not available here (it needs the image itself): write it and save with update_asset_alt.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | No | Site slug or id to act in (multisite). Omit to use this server's default site. Call list_sites to see what exists — an empty tree or search usually means the wrong site, not missing content. | |
| task | Yes | meta_title / meta_description = SEO text from the input; summarize; improve = polish grammar and flow; rewrite; variants = 3 alternatives as a JSON array; translate (needs targetLocale); write = 2-4 paragraphs about the topic in input; schema_fields = suggested fields for the schema.org @type named in input; alt_text is refused (see above). | |
| input | Yes | The text to work on (or, for write, the topic/brief). | |
| targetLocale | No | Locale code of the output language, e.g. 'nb'. Required for translate; for improve/rewrite/variants it overrides 'same language as the input'. |