Step-by-step guide for updating any content item — reading current fields, composing new values, and calling update_content correctly.
Follow this workflow when updating any SitecoreAI content item (page, component datasource, or any other item).
get_current_page_context to get the current page's item ID, language, and site name. Note: this tool does NOT return field values.get_content_item_by_id or get_content_item_by_path to read the item's actual field names and valuesget_component to read its fieldsTitle, Content, Description)update_contentBefore making the tool call, verify:
fields object you are about to send is NOT {}If any check fails — STOP. Go back to the missing step. Do NOT call update_content with empty fields.
update_contentfields parameter MUST contain the field names from step 2, with the values you composed in step 3{
"itemId": "<item-id>",
"fields": {
"<Field Name>": "<h2>Title</h2><p>Body text here</p>"
},
"language": "en",
"createNewVersion": true,
"siteName": "PLAY"
}
reload_current_page to refresh and confirm the updateWhen the user asks to remove a component from a page:
get_components_on_page to identify the component and its datasource item IDdelete_content with the component's datasource item ID and languagereload_current_page to refresh and confirm the removalfields: {} — if you have nothing to write, stop and tell the userupdate_contentupdate_content call