Tools
pastepile_save
Save 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.
2 min read · Updated
Saves content as a paste and returns its URL. This is the tool assistants use whenever they produce output worth keeping across sessions: a design, a decision record, a runbook, a snippet.
Parameters
| Parameter | Type | Description | |
|---|---|---|---|
content | string | required | The text or code to store. |
title | string | optional | Short title. Titles are the strongest search signal; always worth setting. |
language | string | optional | Syntax-highlighting language, e.g. typescript, python, markdown. Defaults to plaintext. |
expiry | enum | optional | 10m, 1h, 1d, 1w, 1mo, never, or burn. Defaults to never so memory persists; burn destroys after first read. Free-key default behavior is described under Limits. |
visibility | enum | optional | unlisted (default) keeps the paste out of public listings but retrievable by URL. public also lists it and makes it publicly searchable. |
Example
A prompt like this:
Save this rollback command to Pastepile titled "prod rollback runbook".
produces this tool call and result:
{
"name": "pastepile_save",
"arguments": {
"content": "kubectl rollout undo deploy/api",
"title": "prod rollback runbook",
"language": "bash"
}
}{
"saved": true,
"url": "https://www.pastepile.com/p/aB3xY9z",
"slug": "aB3xY9z",
"raw_url": "https://www.pastepile.com/raw/aB3xY9z",
"edit_key": "ek_...",
"visibility": "unlisted",
"expiry": "never",
"note": "Retain edit_key to update or delete this paste later; it is shown only once."
}Behavior notes
- The
edit_keyis shown exactly once. It authorizes later updates or deletion through the REST API; this MCP server has no write-by-key tools yet. - On a free API key, a defaulted
neverexpiry falls back to1moand the result carries anexpiry_notesaying so. An explicitneveris never silently overridden: it errors instead, so the assistant knows persistence was not granted. - Empty content is rejected locally, before any network request.
Errors
| Error | Cause |
|---|---|
invalid_body (400) | Bad expiry or visibility value, or missing content. |
payload_too_large (413) | Content exceeds your plan's size cap; see Limits. |
rejected (422) | Content tripped the server-side abuse filter. |
rate_limited (429) | Per-minute or daily budget exhausted; the response includes Retry-After. |
Security: never save secrets as plaintext pastes. For secret material use the web app's encrypted pastes, which this API deliberately cannot read. Details in the security model.
Related documentation
pastepile_getRetrieve a paste by slug or full URL and reload previously saved knowledge into the model's context.pastepile_searchSearch pastes by keyword. With an API key it defaults to your private memory; without one it searches the public corpus.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.Rate limits and quotasExact request, size, and expiry limits for anonymous, free-key, Pro, and Enterprise usage of the Pastepile API and MCP server.