AI-Native
Let an agent edit your content, safely
An agent connected over MCP can create, patch and replace objects the same way the admin form does — through the same validation, the same events, and the same permissions.
Pro
Available in Pro. Writing to a site from an agent needs either the admin persona, authenticated with an API key, or an OAuth token carrying write access — and both API keys and the OAuth server are Pro features. If update_object is missing from an agent's tool list, it is connected read-only. Everything an agent writes goes through the same save path as the admin form: schema validation, slug generation, and the same events the CMS fires for a human edit.
The safe default is patch_object. It merges only the fields you send over the stored object, so omitted fields keep their current values and there is nothing to round-trip and nothing to lose by accident. Three rules govern the merge: containers — cards, decks and lists — replace whole, so send the complete container to change any part of it; clearing is explicit, meaning an empty string or an empty array, because omitting a field never clears it; and binary fields are untouchable.
That last rule is what makes agent editing safe on content-rich collections. Image, file, gallery and depot fields need an upload pipeline a JSON tool call does not carry, so a write never touches them. A blog post with a hero image is fully writable by an agent; the hero keeps the image it has.
When you genuinely mean to rewrite a whole record, update_object replaces it, and whatever you omit reverts to its default. Fetch the object with format: "html" first — the default markdown converts styled-text fields for reading, and writing that conversion back would permanently replace the original HTML. Edit what needs changing, strip the url key that read tools decorate results with, and send the whole body. After any write, do not clear the cache: object writes fire the update event, which invalidates the affected page caches for you.
Reach is capped independently of intent. Every authenticated call clears three gates — the scope the person consented to, what their access groups grant on that collection, and whether the collection is exposed to MCP at all. A blogger's token can save into the blog and is refused on products, however broad its scopes. And what an agent produces depends on what you tell it: schema descriptions and property help text are its only documentation of your content model. tcms schema:lint --strict fails on the ones you left empty.
What you get
Patch by default
patch_object merges only the fields you send. Omitted fields keep their values, so a targeted edit needs no fetch-and-replace round trip.
Binary fields are untouchable
Image, file, gallery and depot fields always keep their current values. A write that tries to set one is refused with the fields named.
Scope, group, exposure
Three independent gates on every authenticated call. A token can never reach a collection the approving user's access groups do not grant.
Same save path as the admin
Agent writes run schema validation, slug generation and the normal events — including the cache invalidation that follows an object update.
Brief the agent in the schema
Property help and MCP descriptions are the agent's documentation. tcms schema:lint --strict fails on the ones you left empty.
In practice
One snippet
# Fetch as stored, not converted for reading
get_object { collection: "blog", id: "summer-update", format: "html" }
# Change one field; everything else is left exactly as it was
patch_object { collection: "blog", id: "summer-update", data: { title: "New Title" } }
A typical editorial turn: read the record as stored, then patch only what changed.
FAQ
Common questions
Can an agent wipe fields it was not asked to touch?
Not with patch_object, which merges only what it sends. update_object does replace the whole record by design, which is why the docs treat patch as the default for edits.
What stops an agent reaching collections it should not?
Access groups. Every authenticated call must clear the consented scope, the approving user's group grants on that collection, and the collection's MCP exposure setting. All three, every call.
Can an agent upload images?
No. Image, file, gallery and depot fields cannot be written over MCP — they need an upload pipeline a JSON tool call does not carry. Set them in the admin afterwards.
Do I need to clear the cache after an agent writes?
No. Object writes fire the update event, which invalidates the affected page caches automatically.
Related features
- Built-in MCP server An MCP server ships with the CMS, not as a plugin. One endpoint serves anonymous, API-key and OAuth callers, each seeing only what you exposed.
- Access groups & permissions Per-group CRUD permissions over collections, schemas, settings and utility pages, enforced on every route and mirrored in the admin interface.
- Custom schemas Define your own object shapes as JSON files. The admin form, the list view, validation and the query surface are all generated from the schema.
Want the details? Read the Agents that write documentation →
Or keep browsing: every Total CMS feature →
Start Your Free 45-Day Trial