update_file_section
Surgically update one section in a markdown file by replacing its body while preserving the heading and siblings. Writes to disk, reindexes search, commits to git; errors if heading not found.
Instructions
Surgical write — replace the body of ONE heading without touching siblings. The heading line itself is preserved verbatim; only its body is rewritten. Persists via the same path as update_file (writes to disk → FTS reindex → git commit). Throws if the heading does not exist (this tool will NOT create a new section — append the section text via update_file first). Heading match is case-insensitive exact-string. No external auth or rate limits. Returns the updated file metadata. Use to make targeted edits without re-sending the whole body; for full-file replacement use update_file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | New body content (heading line is preserved automatically) | |
| file_id | Yes | File ID | |
| heading | Yes | Heading whose body to replace (case-insensitive) |