Patch note section
patch_note_sectionUpdate an existing Markdown section without affecting other headings, using expected hash for safe in-place replacement and rejecting changes that break structure.
Instructions
Use this to rewrite an outdated section in place when the topic already has a note. Replace the content under one existing Markdown heading. Pass the note's current content_hash as expected_hash for CAS. The operation preserves the heading line and non-target sections, stores exact prior history, and writes atomically. It refuses, at every level, a section that contains subsections (error code section_has_subsections, which lists them): patch a subsection instead, or delete it explicitly first. It also refuses content that leaves a code fence or HTML block open, or that changes how other headings are read (section_structure_changed). For duplicate titles, pass 1-based heading_occurrence with heading_level and the exact expected_hash; the ordinal follows document order for those hashed bytes. Do not use chunk_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| heading | Yes | ||
| rel_path | Yes | ||
| request_id | No | ||
| new_content | Yes | ||
| expected_hash | No | ||
| heading_level | No | ||
| heading_occurrence | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| indexed | Yes | ||
| patched | No | ||
| rel_path | No | ||
| replayed | No | ||
| committed | No | ||
| content_hash | Yes | ||
| operation_id | No |