Tools
pastepile_forget
Permanently delete a paste. The API key that saved it is enough, so an assistant can undo a save long after the one-time edit key is gone.
2 min read · Updated
Deletes a paste permanently. This is the tool an assistant reaches for when you say "forget that", and it exists because the credential a session actually still has is the API key, not the one-time edit_key.
An API key can delete a paste that the same key created, and nothing else. Pastes saved with no key, saved by someone else, or made in the browser are not touched by it; those still need their edit_key, which you can pass explicitly.
Parameters
| Parameter | Type | Description | |
|---|---|---|---|
slug | string | required | A slug (aB3xY9z) or any full share URL (https://www.pastepile.com/p/aB3xY9z), exactly as `pastepile_get` accepts. |
edit_key | string | optional | The one-time key from the `pastepile_save` result. Only needed for a paste the configured API key did not create. When both credentials are available the edit key is the one used, because it authorizes this paste alone. |
Example
Forget that rollback runbook you saved, we moved it into the wiki.
{
"name": "pastepile_forget",
"arguments": { "slug": "aB3xY9z" }
}{
"forgotten": true,
"slug": "aB3xY9z",
"credential": "api_key",
"note": "The paste is permanently deleted..."
}Behavior notes
- Deletion is immediate and permanent. There is no trash, no undo, and no grace period: the row is removed, not flagged.
- A deleted paste that belonged to a Pile leaves the Pile entry reading as gone, which is how an expired or burned paste already reads there.
- The row goes at once, and listing and search stop returning it immediately, so the next
scope: "mine"call reflects the deletion. - A read that a CDN already cached can still be served for up to 60 seconds after the delete, which is the ordinary read cache every paste gets rather than anything specific to forgetting. The paste is gone from storage regardless.
- The tool is not idempotent by protocol annotation: a second call on the same slug reports a failure rather than a second success.
Errors
| Error | Cause |
|---|---|
not_found (404) | The slug does not exist, has already expired or burned, or was not created by this key. All three answer identically, on purpose. |
unauthorized (401) | The edit_key was wrong, or the configured API key was rejected. A revoked key reads as no key at all. |
| No credential | Neither an API key nor an edit_key was available, so the tool fails without calling the API. |
The identical 404 is deliberate. If Pastepile told you "that exists, it just is not yours", any key holder could probe which slugs are taken. Do not read a 404 here as proof a slug is free.
Deleting is not reversible. The tool is annotated as destructive so MCP clients can prompt before running it; keep that confirmation on unless you have a reason not to.
Related documentation
pastepile_saveSave text, code, or notes to Pastepile and get back a stable, shareable URL plus a one-time edit key. The write path of durable AI memory.pastepile_listList recent pastes, newest first: your saved pastes with an API key, the public feed without one.Private memoryHow an API key gives your assistant a private, isolated memory namespace on Pastepile, and how scopes decide what search and list can see.