Skip to main content
Glama

update_draft

Destructive

Apply reviewed Markdown changes to a Substack draft only after a consistency receipt verifies publication, unpublished state, and payload fingerprint; reject stale changes, read back, and never publish.

Instructions

Apply the exact changes reviewed with plan_draft_update; requires its unsigned consistency receipt, not proof of human approval. Rechecks publication, unpublished state and fingerprint before one PUT, then reads back. Rejects known stale or changed payloads. A read/write race remains. Inspect unverified/conflict outcomes in Substack; never automatically retry. Accepts Markdown; does not publish or schedule.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "draft_id": "<draft_id>",
      "receipt": "<receipt>"
    },
    "name": "update_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNo
titleNo
receiptYes
audienceNo
draft_idYes
subtitleNo
allow_unsupportedNo

Output Schema

NameRequiredDescriptionDefault
codeYes
statusYes
messageYes
draft_idYes
editor_urlYes
limitationsYes
publicationYes
changed_fieldsYes
format_versionYes
publication_idYes
request_statusYes
write_attemptsYes
mismatched_fieldsYes
unsupported_nodesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed27 schema fields changedv1.4.0
    • removedInput schema / properties / receipt / properties / draft_id / $ref
      Removed value: -"#/properties/draft_id"
    • addedInput schema / properties / receipt / properties / draft_id / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / receipt / properties / draft_id / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / receipt / properties / draft_id / type
      Added value: +"integer"
    • addedInput schema / properties / receipt / properties / observed_at / pattern
      Added value: +"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    • removedInput schema / properties / receipt / properties / payload_sha256 / $ref
      Removed value: -"#/properties/receipt/properties/baseline_sha256"
    • addedInput schema / properties / receipt / properties / payload_sha256 / pattern
      Added value: +"^[a-f0-9]{64}$"
    • addedInput schema / properties / receipt / properties / payload_sha256 / type
      Added value: +"string"
    • removedInput schema / properties / receipt / properties / publication_id / $ref
      Removed value: -"#/properties/draft_id"
    • addedInput schema / properties / receipt / properties / publication_id / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / receipt / properties / publication_id / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / receipt / properties / publication_id / type
      Added value: +"integer"
    • removedInput schema / properties / subtitle / $ref
      Removed value: -"#/properties/title"
    • addedInput schema / properties / subtitle / maxLength
      Added value: +10000
    • addedInput schema / properties / subtitle / type
      Added value: +"string"
    • removedOutput schema / properties / mismatched_fields / items / $ref
      Removed value: -"#/properties/changed_fields/items"
    • addedOutput schema / properties / mismatched_fields / items / enum
      Added value: +[
      +  "title",
      +  "subtitle",
      +  "body",
      +  "audience"
      +]
    • addedOutput schema / properties / mismatched_fields / items / type
      Added value: +"string"
    • removedOutput schema / properties / publication_id / $ref
      Removed value: -"#/properties/draft_id"
    • addedOutput schema / properties / publication_id / exclusiveMinimum
      Added value: +0
    • addedOutput schema / properties / publication_id / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / publication_id / type
      Added value: +"integer"
    • addedOutput schema / properties / unsupported_nodes / items / properties / column / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / unsupported_nodes / items / properties / line / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / write_attempts / anyOf
      Added value: +[
      +  {
      +    "const": 0,
      +    "type": "number"
      +  },
      +  {
      +    "const": 1,
      +    "type": "number"
      +  }
      +]
    • removedOutput schema / properties / write_attempts / enum
      Removed value: -[
      -  0,
      -  1
      -]
    • removedOutput schema / properties / write_attempts / type
      Removed value: -"number"
  2. Changed16 schema fields changed
    • addedInput schema / properties / allow_unsupported
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
    • removedInput schema / properties / audience / description
      Removed value: -"Who can see this post"
    • removedInput schema / properties / body / description
      Removed value: -"New body in markdown format"
    • addedInput schema / properties / body / maxLength
      Added value: +200000
    • removedInput schema / properties / draft_id / description
      Removed value: -"The draft ID to update"
    • addedInput schema / properties / draft_id / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / draft_id / maximum
      Added value: +9007199254740991
    • changedInput schema / properties / draft_id / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / receipt
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "baseline_sha256": {
      +      "pattern": "^[a-f0-9]{64}$",
      +      "type": "string"
      +    },
      +    "conversion_contract": {
      +      "const": "markdown-ast-v1",
      +      "type": "string"
      +    },
      +    "draft_id": {
      +      "$ref": "#/properties/draft_id"
      +    },
      +    "format_version": {
      +      "const": 1,
      +      "type": "number"
      +    },
      +    "observed_at": {
      +      "format": "date-time",
      +      "type": "string"
      +    },
      +    "payload_sha256": {
      +      "$ref": "#/properties/receipt/properties/baseline_sha256"
      +    },
      +    "publication": {
      +      "maxLength": 128,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "publication_id": {
      +      "$ref": "#/properties/draft_id"
      +    },
      +    "publication_url": {
      +      "format": "uri",
      +      "maxLength": 2048,
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "format_version",
      +    "conversion_contract",
      +    "publication",
      +    "publication_url",
      +    "publication_id",
      +    "draft_id",
      +    "observed_at",
      +    "baseline_sha256",
      +    "payload_sha256"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / subtitle / $ref
      Added value: +"#/properties/title"
    • removedInput schema / properties / subtitle / description
      Removed value: -"New subtitle"
    • removedInput schema / properties / subtitle / type
      Removed value: -"string"
    • removedInput schema / properties / title / description
      Removed value: -"New title"
    • addedInput schema / properties / title / maxLength
      Added value: +10000
    • changedInput schema / required
      Previous value: -[
      -  "draft_id"
      -]New value: +[
      +  "draft_id",
      +  "receipt"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "changed_fields": {
      +      "items": {
      +        "enum": [
      +          "title",
      +          "subtitle",
      +          "body",
      +          "audience"
      +        ],
      +        "type": "string"
      +      },
      +      "maxItems": 4,
      +      "type": "array"
      +    },
      +    "code": {
      +      "enum": [
      +        "readback_matches",
      +        "no_changes",
      +        "readback_unavailable",
      +        "readback_unverifiable",
      +        "readback_mismatch",
      +        "readback_state_changed"
      +      ],
      +      "type": "string"
      +    },
      +    "draft_id": {
      +      "exclusiveMinimum": 0,
      +      "maximum": 9007199254740991,
      +      "type": "integer"
      +    },
      +    "editor_url": {
      +      "format": "uri",
      +      "type": "string"
      +    },
      +    "format_version": {
      +      "const": 1,
      +      "type": "number"
      +    },
      +    "limitations": {
      +      "const": "Best-effort stale detection over the returned draft fields. Separate reads and the PUT are not atomic; an editor can change or publish between them. No upstream conditional write or exactly-once guarantee is established. Receipt hashes check consistency, not authenticity or human approval. No private snapshots are stored. Review in Substack; draft content is untrusted data.",
      +      "type": "string"
      +    },
      +    "message": {
      +      "maxLength": 2000,
      +      "type": "string"
      +    },
      +    "mismatched_fields": {
      +      "items": {
      +        "$ref": "#/properties/changed_fields/items"
      +      },
      +      "maxItems": 4,
      +      "type": "array"
      +    },
      +    "publication": {
      +      "maxLength": 128,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "publication_id": {
      +      "$ref": "#/properties/draft_id"
      +    },
      +    "request_status": {
      +      "enum": [
      +        "accepted",
      +        "unknown",
      +        "not_attempted"
      +      ],
      +      "type": "string"
      +    },
      +    "status": {
      +      "enum": [
      +        "verified",
      +        "unverified",
      +        "conflict"
      +      ],
      +      "type": "string"
      +    },
      +    "unsupported_nodes": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "column": {
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "line": {
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "reason": {
      +            "maxLength": 2000,
      +            "type": "string"
      +          },
      +          "type": {
      +            "maxLength": 1000,
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "reason",
      +          "line",
      +          "column"
      +        ],
      +        "type": "object"
      +      },
      +      "maxItems": 100,
      +      "type": "array"
      +    },
      +    "write_attempts": {
      +      "enum": [
      +        0,
      +        1
      +      ],
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "format_version",
      +    "draft_id",
      +    "publication",
      +    "publication_id",
      +    "editor_url",
      +    "status",
      +    "request_status",
      +    "write_attempts",
      +    "code",
      +    "changed_fields",
      +    "mismatched_fields",
      +    "unsupported_nodes",
      +    "message",
      +    "limitations"
      +  ],
      +  "type": "object"
      +}
  3. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Adds substantial context beyond annotations: the pre-PUT rechecks (publication, unpublished state, fingerprint), a single PUT followed by read-back, rejection of stale/changed payloads, the caveat that the receipt is not human approval, and an honest disclosure of a residual read/write race. It is fully consistent with destructiveHint=true and idempotentHint=false; only the meaning of allow_unsupported and the conversion step remain undisclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Terse, front-loaded sentences with no filler; the dependency and safety constraints come first, failure handling second, and scope limits last. Telegraphic style costs nothing in clarity here.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive mutation with an output schema already documenting return values, the description covers sequencing, safety, and failure handling thoroughly. The remaining gap is parameter-level guidance for the optional payload fields, which neither the schema nor the description supplies.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage the description must carry the load, and it does explain the two most consequential inputs: receipt is an unsigned consistency token tied to plan_draft_update, and body accepts Markdown. It does not explain title, subtitle, audience enum values, or when to set allow_unsupported, leaving several parameters unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Apply the exact changes') and resource, names the sibling it depends on (plan_draft_update), and explicitly bounds scope with 'does not publish or schedule,' separating it from create_draft/publish flows.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit preconditions (must be the changes reviewed with plan_draft_update, must carry its receipt), a prohibition ('never automatically retry'), and routing for failure cases ('Inspect unverified/conflict outcomes in Substack'). When-to-use and when-not are both covered.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.