Edit Page Content
edit_page_contentReplace a Canvas page's HTML body or edit one fragment with find/replace. Optional guards refuse the write if the page changed since you read it, then verify the result.
Instructions
Replace the HTML body of a page (and optionally its title).
new_content becomes the whole body: it is not merged or appended, so pass the complete page, not a fragment. To change one fragment, pass find and replace instead of new_content. Publishing state, editing roles, and front-page status are unchanged; use update_page_settings.
Optional guards (any of them makes the tool fetch the page first, refuse rather than write on a failed check, and read the page back after): expect_updated_at refuses if the page changed since you read it; find/replace edits one fragment of the current body; require lists strings that must already be present.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| find | No | Exact HTML fragment that must occur exactly once in the current body | |
| title | No | Optional new title for the page | |
| replace | No | Text that replaces find (may be empty to delete it) | |
| require | No | Strings that must already be present in the current body | |
| new_content | No | Complete new HTML body (replaces the old body). Omit when using find/replace. | |
| page_url_or_id | Yes | Page URL slug or page ID | |
| course_identifier | Yes | Course code or Canvas ID | |
| expect_updated_at | No | The page's updated_at when you read it; refuse if it has changed |