Edit a Napkin doc
napkin_docs_updateEdit a Napkin doc. For a change to existing prose use edits — a list of exact find/replace pairs, which is the SAFEST option and the one to reach for by default: it leaves everything you did not target untouched, and it fails loudly rather than clobbering a doc somebody else is typing in. append adds a section at the end. body replaces the WHOLE document and should be a last resort. Also retitle, describe, set visibility, or archived (true takes it out of the gallery, false brings it back). Read the doc with napkin_docs_get first — edits match the current text exactly. Doc ids come from napkin_docs_list.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Full replacement markdown body. Prefer `edits` — this overwrites everything. Write each paragraph as ONE long line; the editor wraps it for the reader. | |
| docId | Yes | Doc id from napkin_docs_list. | |
| edits | No | Targeted find/replace pairs, applied in order. All must match or none are applied. | |
| title | No | ||
| append | No | Markdown appended to the end (own paragraph). | |
| archived | No | ||
| workspace | No | Workspace slug. Personal tokens with no default workspace MUST pass this; tokens with a default can override per call. Ignored for workspace API keys. | |
| approvalId | No | Approval id from a prior needs_confirmation response. Omit on the first call. | |
| visibility | No | Who can see it: PRIVATE (only the user), WORKSPACE (every member, the default), or SHARED (specific people, granted afterwards). Say 'make it private' → PRIVATE. | |
| description | No | Short gallery summary. |