Read a doc's HTML
get_doc_htmlRead the current HTML body of any docfarm HTML doc the user has access to — their own docs OR docs other people have shared with them (as collaborator or via share link). Returns title, share URL, the caller's role (owner / collaborator / reader), and the full HTML. ESSENTIAL precursor to patch_doc: call this first whenever the user asks for any change to a doc you don't have in context, so you can see what's there and construct accurate before/after snippets. Pass doc_name (easiest, fuzzy-matched) or slug. Embedded base64 images are stripped to placeholders by default (huge docs become readable in one call), so hosting a stripped copy back would drop those images from the doc; edit via patch_doc, or re-fetch with strip_data_uris: false for the byte-exact original. Large docs page via offset/max_chars — the response tells you the offset for the next slice.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | No | Share-link slug or full URL. Alternative to doc_name. | |
| offset | No | Character offset to start reading from (default 0). Use the value from the previous response's continuation note. | |
| account | No | Email address of the farm to act on. Omit for the signed-in farm. Only a connected account is accepted; call list_accounts to see which. | |
| doc_name | No | Doc name. Fuzzy-matched against the caller's own docs first, then docs they collaborate on. | |
| max_chars | No | Max characters to return per call (default 200000, max 500000). | |
| strip_data_uris | No | Default true: base64 data URIs ≥1KB are replaced with short placeholders so content isn't crowded out by embedded images. Pass false for the byte-exact original. |