lesson_patch
Replace one unique substring in a materialized lesson.
Instructions
Replace one unique substring in a materialized lesson.
old_string must occur exactly once within the lesson's markdown
body. The operation preserves the lesson's heading, summary, provenance,
and timestamps, unlike a wholesale lesson_append replacement.
For target="summary", old_string must equal the entire current
summary and new_string must be a nonempty single line without markers.
A recovery pre-image is saved before the change.
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": {
"slug": "<slug>",
"old_string": "<old_string>"
},
"name": "lesson_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | ||
| target | No | body | |
| new_string | No | ||
| old_string | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |