update_file_section
Replace the body of a single heading in a file without affecting siblings. The heading line remains unchanged. Use for precise edits instead of rewriting the entire file.
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 |
|---|---|---|---|
| file_id | Yes | File ID | |
| heading | Yes | Heading whose body to replace (case-insensitive) | |
| content | Yes | New body content (heading line is preserved automatically) |