Replace course content
course_content_setReplace a course's lessons by saving a complete new content version, which enrolled learners see immediately; settings such as price or visibility are changed with course_update instead. Earlier versions stay readable with course_content_get, so a bad write can be rolled back. This is not a patch: send the whole course every time, as blocks (EditorJS) or markdown (prose only), with H2 headers as section titles and H3 headers as unit titles. Keep each existing block's id from course_content_get: learners' answers, submissions and completion records are tied to block ids, so a block saved without its id (and every block written as markdown) no longer shows its learners' history. Get block shapes from block_type_list; its courseAssessments blocks (quiz, assignment, form, poll and similar) are valid ONLY in course content. To change only a quiz's pass mark or attempt limit, use quiz_settings_update, which leaves the rest of the course untouched. Every call adds a version, even an identical one; returns the new version number and block count, the course page or how to publish a hidden course, and warnings about blocks that will not render as meant.
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": {
"id": "<id>"
},
"name": "course_content_set"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Course id (required). | |
| blocks | No | The complete lesson list as EditorJS blocks [{id?, type, data}], in order (must not be empty). Include each existing block's id to keep its learner records; blocks without one get a new id. Wins over markdown if both are sent. | |
| authorId | No | User recorded as this version's author; must belong to this site. Defaults to the connection's owning user. | |
| markdown | No | The whole course as Markdown (headings, paragraphs, lists, checklists, quotes, tables, code), converted to blocks with new ids; it cannot express graded blocks. Use this OR blocks. |