AI assistants (MCP)
An AI assistant (Claude Code, Claude Desktop or any other MCP client) can help write and restructure content in SHADE. It connects over the Model Context Protocol (MCP, an open standard for giving an AI a fixed set of tools) as an AI user, and can only read content and save drafts. A person reviews every AI change on the AI changes screen and decides whether it goes live. Setting up a client is described in MCP: connecting an AI assistant.
What users can do
Admins
- Create an AI user (role
ai, no password, cannot sign in to the admin); see Users and roles. - Create an MCP token that acts as that AI user, and revoke it; see API tokens. Deactivating the AI user stops all its tokens.
The AI assistant (through the tools listed below)
- Read pages, headers and footers with their draft content (a tree of elements and text), the published navigation and footer, and images in the media library.
- Create new unpublished pages; add, change, move and remove elements and texts in a page's or a header's or footer's draft, set their own styles and animations, and translate their texts.
- Make headers and footers, unpublished and not the default, and move one nothing shows to the trash
(
website_delete_part). - Add, change and remove the site's classes, variables and breakpoints (
website_set_class,website_set_variable,website_set_breakpoint), which go live with the next publish. - Set the alt text of an image.
- Read and draft entries of collections that allow AI: today the website's pages, posts, navigation and footer, and the shop's products.
Editors and admins
- See every page version an AI user made, filter to those awaiting review, open the page in the editor, view the changes element by element, and revert a change that is still the latest version (the previous version comes back as a new version).
- Publish what the AI drafted, in the normal page editor (Drafts, publishing and history).
Who may do it
| Action | Permission | Roles |
|---|---|---|
| Create AI users | team.manage | admin |
| Create and revoke MCP tokens | tokens.manage | admin |
| Use the MCP tools | an MCP token of an active AI user, plus the tool's permission (table below) | ai only; admins and editors are refused |
| See the AI changes screen and its comparisons | content.read | admin, editor |
| Revert an AI change | the update permission of the change's collection (collections.<slug>.update), and not an AI user | admin, editor |
AI users may read content and media, see the theme and set alt texts, plus what each collection allows them: pages and posts let them read, create and update (drafts only; a person publishes).
The MCP tools
These are all the tools. Module tools are added only while the module is on, and only those the module marks safe
for AI. The website_* tools come from the website module while it is on, the analytics_* tools from the analytics
module, the commerce_* tools from the shop, the appointments_* tools from appointments; the others are core's.
Pages, layout and media
| Tool | What it does | Permission |
|---|---|---|
website_list_pages | Pages with title, slug, status and "has unpublished changes"; search by title | collections.website-pages.read |
website_get_page | One page with SEO, structured data, its draft version and the draft content, a tree of elements and text; for another language, the texts with nothing in that language yet | collections.website-pages.read |
website_set_structured_data | Replaces a page's structured data presets (article, breadcrumb, questions, software application) in its draft; a preset left out is off | collections.website-pages.update |
list_data_sources | Data sources a page can show: name, settings and item fields | content.read |
website_get_layout | The published navigation and footer; their drafts are changed with get_entry and update_draft_entry on website-navigation and website-footer | collections.website-navigation.read |
website_list_parts | The site's headers and footers: title, kind, whether it is the default, status | collections.website-parts.read |
website_create_part | Makes a header or footer (title, kind, optional content), unpublished and not the default | collections.website-parts.create |
website_get_part | One header or footer with its draft version and draft content, as website_get_page gives a page's; the page tools change it given its partId | collections.website-parts.read |
website_delete_part | Moves a header or footer to the trash, where a person restores it or removes it for good; refused for the default one and for one a page picks; marked as destructive in the AI client | collections.website-parts.delete |
search_media | Images by filename or alt text (id, filename, alt, size, address) | media.read |
list_media_without_alt_text | Images whose alt text is empty | media.read |
website_create_draft_page | New unpublished page from title, slug and optional content | collections.website-pages.create |
website_add_node | Adds an element, a text or a component, with what it holds, at a position in a page draft (also in a component's slot); checked as any insert | collections.website-pages.update |
website_update_node | Changes one element's tag, attributes or classes, a text's value, or a component's properties or variant; a widget's parts' classes (parts) | collections.website-pages.update |
website_list_components | The component library: names, properties, slots and variants; then SHADE's widgets (tabs, a menu, a dialog…), what each renders and the parts that take classes | website.components.read |
website_list_starters | The starters an admin can add to the library, and whether each is there already (a form comes from one) | website.components.read |
website_get_site | What writing a page needs: the site's languages, breakpoints, classes and variables, the styles' revision, and the style properties with the values each takes | website.styles.read |
website_set_class | Adds, changes or removes one of the site's classes; checked as a save of the styles, refused when they changed since the revision given; live with the next publish | website.styles.update |
website_set_variable | Adds, changes or removes one of the site's variables (not the theme's); refused while a style uses one it removes | website.styles.update |
website_set_breakpoint | Adds, changes or removes one of the site's breakpoints; refused while a style, an animation or a menu's fold point uses one it removes | website.styles.update |
website_get_styles | A page's elements' own styles; a header's or footer's with partId | website.styles.read |
website_set_element_style | Sets or removes one element's own styles; refused for an element the draft lacks; live when the page is published; on a header or footer with partId | website.styles.update |
website_get_animations | A page's animations; a header's or footer's with partId | website.styles.read |
website_set_animations | Replaces a page's animations, checked as the Motion tab's are; live when the page is published; a header's or footer's with partId | website.styles.update |
website_get_theme | The theme's draft and published tokens, their versions, whether the draft has unpublished changes, and the rules the tokens follow | collections.website-theme.read |
website_save_theme_draft | Merges a partial change (a section, or single tokens) onto the theme's draft and checks the whole result; with baseVersionId and dryRun; live only when a person publishes the theme | collections.website-theme.update |
website_translate_texts | Saves texts (texts, and text attributes such as alt) in another of the site's languages; other texts and languages keep theirs | collections.website-pages.update |
website_duplicate_node | Copies an element or text (with what it holds and its own styles) in a draft, or into another page's draft, with the animations wholly inside it under new names | collections.website-pages.update |
website_make_component | Saves elements of a draft that stand next to each other as a new library component, with their own styles and animations, and puts a use of it in their place (an animation naming elements inside and outside the selection is dropped and named in the result); the component is then in the library for every page | website.components.manage |
website_duplicate_page | Copies a page as a new unpublished page, with every language's title, address and SEO, and its own styles and animations when the caller may change them | collections.website-pages.create |
website_move_node | Moves an element or text (with what it holds) within the same draft | collections.website-pages.update |
website_remove_node_from_draft | Removes an element or text (with what it holds) from the draft; marked as destructive in the AI client | collections.website-pages.update |
website_replace_nodes | Replaces an element (with what it holds), or the page's whole content, with new elements in one change: all of it is saved or nothing; marked as destructive in the AI client | collections.website-pages.update |
website_check_publish | What publishing the saved draft would say: the accessibility check's errors and warnings, each with its element, and the search engine warnings; publishes nothing; a header or footer with partId, around an empty page | collections.website-pages.read |
website_set_seo | Sets a page's SEO title, description, "hide from search engines" and canonical address in its draft; the title and description per language | collections.website-pages.update |
set_alt_text | Sets an image's alt text (1–300 characters), nothing else; not for images on the live site | media.update |
The tools that read or change a page's elements, own styles, animations and texts, and its publish check, work on a header or footer too: give its partId (from website_list_parts) in place of pageId. The table names the permission each tool declares; with partId, the headers' and footers' read (and, for the tools that change elements or texts, their update) is checked as well, when the header or footer is read and saved. The tools that add, change, move, remove or replace elements take dryRun: the change is checked as saving it would check it, with the same errors, and nothing is saved. The theme has two tools of its own, and both work on its draft: the AI saves a change, and a person publishes it from the Theme page or from the AI changes screen. website_save_theme_draft takes only what changes ({ "colors": { "primary": "#1a2b3c" } }, or { "radius": 12 }), merges it onto the draft and checks the whole result, so a colour that isn't hex or a font file that isn't WOFF2 is refused with the token's name. It also takes dryRun, and the draftVersionId from website_get_theme as baseVersionId: a draft that changed since is refused.
Analytics (read only, while the analytics module is on): counts only, never anything about a visitor.
| Tool | What it does | Permission |
|---|---|---|
analytics_summary | Page views and visitors over 7, 30 or 90 days (total and per day), the top pages, referring sites, campaigns, devices, countries, languages and pages not found, and the other sites counted | analytics.read, and content.read |
analytics_goals | Each goal's total, count per day and top pages over the period | analytics.read, and content.read |
analytics_paths | Pairs of "from page, to page" with their views, at most 50, optionally only those from or to one page | analytics.read, and content.read |
Shop (read only, while the shop is on): numbers and products, never who ordered.
| Tool | What it does | Permission |
|---|---|---|
commerce_orders_to_ship | Paid orders not shipped yet, oldest first: number, when paid, amount, country, oversold, and what is in them | commerce.read |
commerce_sales_today | One day's paid orders: how many, what was charged, VAT and refunds, per currency | commerce.read |
commerce_low_stock | Tracked SKUs with 3 or fewer available | commerce.read |
Appointments (read only, while the appointments module is on): times and places, never who booked.
| Tool | What it does | Permission |
|---|---|---|
appointments_today | One day's confirmed appointments (start, end, location) and the locations | appointments.ai.read |
appointments_week | The 7 days from a date, per day | appointments.ai.read |
appointments_free_times | The times a visitor could book, over 1 to 14 days | appointments.ai.read |
appointments_location_day | One location's appointments and free times for a day | appointments.ai.read |
Collections: only for collections that allow AI (their AI setting, see Collections and entries) and give the AI role the matching permission.
| Tool | What it does | Needs |
|---|---|---|
list_collections | Collections the AI may read, with their fields (nested fields included) and whether it may write | content.read; lists only collections the AI may read |
list_entries | Working copies of entries, with filters and search (at most 50 per page) | AI may read the collection |
get_entry | One entry with its fields and current version; a collection with one entry uses id "1" | AI may read the collection |
create_draft_entry | New unpublished entry (note "Created by AI") | AI may write, the collection has drafts, AI may create |
update_draft_entry | New draft version with the given fields changed, based on the version get_entry gave | AI may write, the collection has drafts, AI may update |
Modules can add tools. The website module adds the website_* tools above, analytics the analytics_* tools, the shop the commerce_* tools, appointments the appointments_* tools and the editorial module the editorial_* tools: lists of schedules, review requests, releases, out-of-date translations and comment threads, and two that write, submit an entry for review and add a comment. The AI cannot schedule, approve, publish or manage releases. These
show numbers, products, times and places only: orders hold personal data, and AI clients never see customers. Shop products are reachable through the collection tools: the shop lets
the AI read, create and update them.
Hard limits
Whatever the AI role's permissions become, these can never be done over MCP: publishing and deleting pages, uploading and deleting media, theme, settings (including the build hook), users, tokens, the audit log, rebuilds, redirects and modules. No tool can use them, and the collection tools can only read, create or update (never publish or delete).
So the AI:
- saves drafts only: page tools save drafts, collection tools never touch the published version, and a collection without drafts cannot be written to;
- never publishes by itself; the one change of its own that reaches the live site is moving a published header or footer nothing shows to the trash, which takes it off the site and asks for a rebuild; a person restores it or removes it for good;
- cannot upload files;
- drafts the navigation, the footer, the headers and footers, and the theme, and a person publishes each; it makes headers and footers, and deletes only one nothing shows;
- cannot change settings;
- may change only the alt text of an image, never its focal point or filename;
- may only describe images that published content does not use yet. Alt text has no drafts, so a change on a live image would reach the site with the next rebuild without a person publishing it; those are refused ("This image is on the live site…") and a person sets their alt text.
In the admin

AI changes (a tab of Reviews, also found by search; shown with content.read). A table of versions an AI user made (counted
when they were saved: an account that leaves the AI role later keeps its changes here, and a person who becomes an
AI account brings none of their own), of
pages and of the entries of every other collection the reader may read (posts, a module's products), newest first,
20 per page.
- Columns: Changed (the title, linking to its editor, with its collection under it), AI user, Note (e.g. "AI added a section", "Updated by AI"), When, State.
- State: Published (this version is live), Awaiting review (still the latest version, nobody saved after it), Superseded (a later version exists).
- Awaiting review only switch (on by default): only versions nobody reviewed yet: still the latest, and not published (a person publishing it counts as a review).
- Row menu: Open in editor; View changes (a side panel comparing the version with the one before it, field by field, title, slug, SEO and the content element by element; "The AI made this." when there is none); Revert.
- Revert asks "Revert the AI change to {title}?" and restores the version before the change as a new version; the AI change stays in the history. Disabled when the AI created it (delete it instead), when a later version exists (it is Superseded: reverting it would undo the later edits too; restore an earlier version from the entry's history instead) or the user may not update it.
AI accounts and MCP tokens are made on the Team and API tokens screens (Team and roles, API tokens). The admin is also in Dutch.
On the website
Nothing directly: AI changes are drafts and reach the site only when a person publishes them.
Rules and limits
- Address: the admin's address followed by
/api/mcp(see connecting). Only an MCP token of an active AI user gets in. - Every call is checked: the token, that it is an AI user, and the tool's permission. What the AI sends is checked against the tool's own rules.
- Errors the AI can read: SHADE's own errors come back with their message and each problem found, so the AI can correct itself; anything else is "Internal error", without details.
- Rate limit: 120 calls a minute per token (Request protection). Each request carries one message: a JSON-RPC batch of several is refused, so every tool call counts. The usual request size limit applies.
- Saving at the same moment: a person and the AI saving the same draft at the same moment never overwrite each
other: the later save is refused. A person editing the page in the editor is told on their next save after an AI
save.
update_draft_entryneeds the version the AI read (Drafts, publishing and history). - Impossible changes (an unknown element, a tag or attribute that isn't allowed, wrong nesting, an id already used) are refused and save nothing. A refusal names the element or text it is about.
- Unknown fields in a tool's input are refused, never dropped, so the AI knows what wasn't saved.
- Forms: a form the AI builds by hand would send nothing, so it is refused. The AI adds a form component from the library instead; when there is none, it names the Form starter for an admin to add.
- Unchanged content saves no new version.
- Audit: every write is recorded as made over MCP, with the AI user as who did it (Audit log). Page saves carry a note, so the version history shows what the AI did.
- Languages:
website_get_pagelists a draft's untranslated texts in another language, andwebsite_translate_textstranslates them (the default language and unknown languages are refused).get_entry,update_draft_entryandset_alt_textwork in a chosen language too (only translatable text changes; what is not sent keeps its translation or keeps falling back). - Editing a draft that changed.
website_get_pagegives the draft's version; when the AI passes it back to the write tools, a draft that changed since is refused ("The page changed since you read it: call website_get_page again…"). Without it the edit applies to the current draft. - Module tools meant for admins only are never offered to the AI.
- Revert is not allowed for AI users, and only a change that is still the latest version can be reverted: a later version, a person's edit among them, is never undone by it. The AI changes screen lists every unreviewed AI change, oldest first.
For developers
The code and its tests: shade/features/ai/README.md in the shade repository.