set_field
Update a single content field in a draft using a plain string. This method ensures long text or Markdown survives client serialization without data corruption.
Instructions
Write ONE field of an item's draft as a plain string; the other fields are kept. It is the safest way to send long text or Markdown, because a flat string survives client serialization that can mangle long strings nested in update_content's data. field is a text, markdown, select, datetime or image field from list_content_types {name} (an image takes an asset documentId), or name for the item's display name; value is the field's whole new value. For richtext, contentArea or reference fields, or several fields at once, use update_content. A value the field can't take is refused with the expected shape and an example; text in another language than the locale branch is refused unless allowLanguageMismatch. Like any agent edit, it cancels a pending scheduled publish. Returns the saved draft in the get_content shape; publish_content separately. Requires the content.update permission (Admin, Editor, Author — an Author only within their own sections).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"documentId": "<documentId>",
"field": "<field>",
"value": "<value>"
},
"name": "set_field"
}
}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. | |
| field | Yes | Field name from the content type (or 'name') | |
| value | Yes | The plain string value | |
| locale | No | Locale code. Omit for the document's own locale (its site-default variant, else its only variant). | |
| documentId | Yes | The item's documentId (stable across locales and versions), e.g. from list_tree, list_content or get_content. | |
| allowLanguageMismatch | No | Set true ONLY to deliberately write text whose language differs from the locale branch (the guard otherwise refuses, so e.g. Norwegian text can't silently land on the 'en' branch) |