manage_scratchpad
Compose and edit multi-line text in a scratchpad, then deliver to Gmail, Docs, Sheets, Calendar, or Tasks. Supports line/JSON editing, file attachments, and imports.
Instructions
Compose, edit, and deliver text content. Use for any multi-line content: emails, documents, descriptions. Compose in the scratchpad, edit by line or JSON path, attach files, then send to any target. For short one-liners, use the service tool directly instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keep | No | For send: keep scratchpad after successful send (default: true) | |
| path | No | For json_* ops: JSON path (e.g., $.config.name, $.items[0].value) | |
| label | No | For create: optional human-readable label | |
| refId | No | For detach: attachment reference ID (att-1, att-2, etc.) | |
| value | No | For json_set, json_insert: value to set or insert (any JSON type) | |
| fileId | No | For attach (drive source): Drive file ID | |
| format | No | For create: content format (default: text). Controls validation and addressing mode. | |
| source | No | For attach: file source (workspace or drive). For import: resource type (doc, email, sheet, drive_file). | |
| target | No | For send: delivery target | |
| content | No | Text content. For create (pre-fill), insert_lines, append_lines, replace_lines. | |
| endLine | No | End of line range (inclusive). For replace_lines, remove_lines, copy_lines, view. | |
| filename | No | For attach (workspace source): filename in workspace | |
| afterLine | No | Insert after this line number (0 = prepend). For insert_lines, copy_lines, attach. | |
| operation | Yes | create: new buffer | view: show content | discard: free buffer | list: show all | insert_lines/append_lines/replace_lines/remove_lines: line editing | copy_lines: copy from another scratchpad | json_get/json_set/json_delete/json_insert: path-addressed JSON editing | attach/detach: file references | import: load from Google Workspace resource | send: deliver to target | |
| startLine | No | Start of line range (1-based). For replace_lines, remove_lines, copy_lines, view. | |
| scratchpadId | No | Scratchpad ID (sp-XXXX). Required for all operations except create and list. | |
| sourceParams | No | For import: source-specific parameters (e.g., { documentId, mode } for doc, { messageId } for email) | |
| targetParams | No | For send: target-specific parameters (e.g., { email, to, subject } for email, { filename } for workspace) | |
| fromScratchpadId | No | For copy_lines: source scratchpad ID |