Replace a pad
set_documentReplace the entire content of a pad. For non-empty pads, confirm by first requesting a token, then calling again with that token.
Instructions
Replaces the entire content of a pad. Replacing a non-empty pad requires confirmation: call once to receive a token, then again with that token. For targeted changes prefer replace_in_document, which leaves concurrent edits elsewhere in the pad intact.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Id of the pad, the part after # in its URL | |
| text | Yes | Plain text content (up to 256 KiB, the Rustpad document limit) | |
| confirm_token | No | Confirmation token from a previous call of this tool with the same arguments. Omit on the first call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| url | Yes | Shareable; anyone with it can read and edit. | |
| note | Yes | ||
| changed | Yes | False when the pad already held exactly this content. | |
| characters | Yes | Length of the pad after the write, in codepoints. | |
| characters_before | Yes |