Edit a workbook directly
write_workbookWrites a new version of a workbook yourself, with no run and no charge. Send base_version — the version you read — and EXACTLY ONE of document (the whole text of a one-tab workbook) or sheets (the tabs, in their new order: {id} alone keeps a tab unchanged, {id, markdown} and/or {id, name} replaces what you give, {name, markdown} with no id adds a tab, and a tab you leave out is removed). note is one line on what changed and labels the version. Every write is a new version by this account; the one before is kept and can be restored. Refused if the workbook has moved past base_version or a run is writing it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | One line on what changed, e.g. 'Updated Q3 cash from the 10-Q'. | |
| sheets | No | Every tab in its new order. Tab ids come from read_workbook's `tabs`. | |
| context | No | Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as "a user", "the customer", or "an account". Example: "Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution." | |
| document | No | The new text of a one-tab workbook. | |
| workbook | Yes | The workbook id. | |
| llm_model | No | The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess. | |
| base_version | Yes | The version you read and changed. |