Skip to content

pin_revert

Undo the most recent draft edit using its recovery_ref and current draft revision.

For agents: this page as Markdown.

Group
Pinterest
Granted by
pinterest:write
Team permission
listing.edit — a role that can edit listings
Effect
Writes to the seller’s Tusella workspace only. Nothing is sent to Etsy or Pinterest.
Retry-safe
Repeat the same client_request_id with the same arguments.

Description

Undo the most recent draft edit using its recovery_ref and current draft revision. Refuses when another change or submission has advanced the Pin.

Parameters

Name Type Required Description
client_request_id string yes Mint once for this deliberate command; reuse the same key and payload on every retry.
expected_draft_revision integer yes The revision returned by your last Pin read.
pin_id string yes The id returned by a Tusella read.
recovery_ref string yes The id returned by a Tusella read.

Example

Arguments
{
  "pin_id": "00000000-0000-0000-0000-000000000001",
  "client_request_id": "revert",
  "expected_draft_revision": 1,
  "recovery_ref": "00000000-0000-0000-0000-000000000001"
}
Result
{
  "result": {
    "pin_id": "00000000-0000-0000-0000-000000000001",
    "draft_revision": 2,
    "selection_revision": 0,
    "intent_revision": 0,
    "lifecycle_state": "draft",
    "tusella_path": "/pinterest?dispatch=00000000-0000-0000-0000-000000000001",
    "command_id": "00000000-0000-0000-0000-000000000001",
    "outcome": "",
    "reason_code": "",
    "requested_for": null,
    "timezone": "",
    "pin_url": null
  }
}

Schemas

Exactly what the server declares to MCP clients. The input_schema is what the server validates arguments against.

Input schema· 32 lines of JSON
{
  "additionalProperties": false,
  "properties": {
    "client_request_id": {
      "description": "Mint once for this deliberate command; reuse the same key and payload on every retry.",
      "maxLength": 128,
      "type": "string"
    },
    "expected_draft_revision": {
      "description": "The revision returned by your last Pin read.",
      "minimum": 0,
      "type": "integer"
    },
    "pin_id": {
      "description": "The id returned by a Tusella read.",
      "maxLength": 64,
      "type": "string"
    },
    "recovery_ref": {
      "description": "The id returned by a Tusella read.",
      "maxLength": 64,
      "type": "string"
    }
  },
  "required": [
    "pin_id",
    "client_request_id",
    "recovery_ref",
    "expected_draft_revision"
  ],
  "type": "object"
}
Output schema· 82 lines of JSON
{
  "additionalProperties": false,
  "properties": {
    "command_id": {
      "maxLength": 64,
      "type": "string"
    },
    "draft_revision": {
      "minimum": 0,
      "type": "integer"
    },
    "intent_revision": {
      "minimum": 0,
      "type": "integer"
    },
    "lifecycle_state": {
      "maxLength": 32,
      "type": "string"
    },
    "outcome": {
      "maxLength": 16,
      "type": "string"
    },
    "pin_id": {
      "maxLength": 64,
      "type": "string"
    },
    "pin_url": {
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "reason_code": {
      "maxLength": 64,
      "type": "string"
    },
    "recovery_ref": {
      "maxLength": 64,
      "type": "string"
    },
    "requested_for": {
      "maxLength": 64,
      "type": [
        "string",
        "null"
      ]
    },
    "selection_revision": {
      "minimum": 0,
      "type": "integer"
    },
    "timezone": {
      "maxLength": 64,
      "type": "string"
    },
    "tusella_path": {
      "maxLength": 100,
      "type": "string"
    }
  },
  "required": [
    "pin_id",
    "draft_revision",
    "selection_revision",
    "intent_revision",
    "lifecycle_state",
    "tusella_path",
    "command_id",
    "outcome",
    "reason_code",
    "requested_for",
    "timezone",
    "pin_url"
  ],
  "type": "object",
  "x-result-size-budget": {
    "max_bytes": 19000,
    "strategy": "bounded-result"
  }
}