Skip to content

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

ParameterTypeDescription
contentstringrequiredThe text or code to store.
titlestringoptionalShort title. Titles are the strongest search signal; always worth setting.
languagestringoptionalSyntax-highlighting language, e.g. typescript, python, markdown. Defaults to plaintext.
expiryenumoptional10m, 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.
visibilityenumoptionalunlisted (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:

Request
{
  "name": "pastepile_save",
  "arguments": {
    "content": "kubectl rollout undo deploy/api",
    "title": "prod rollback runbook",
    "language": "bash"
  }
}
Result
{
  "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_key is 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 never expiry falls back to 1mo and the result carries an expiry_note saying so. An explicit never is never silently overridden: it errors instead, so the assistant knows persistence was not granted.
  • Empty content is rejected locally, before any network request.

Errors

ErrorCause
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