Skip to main content
Glama

Update a draft

update_draft
DestructiveIdempotent

Saves changes to a draft, or to the working copy of a published post, at a given baseRevision. Only the fields in patch change, and each field sent replaces its stored value whole: patch.body is the draft's complete new text. If the draft has been saved since baseRevision, nothing is written and a conflict with the current revision is returned. The live post does not change. Shown to the owner as a draft preview. Requires the drafts:write scope. Publishing, unpublishing and changes to the live profile are made only by the owner, in Entry.

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": {
      "entryId": "<entryId>",
      "draftId": "<draftId>",
      "baseRevision": "<baseRevision>",
      "patch": "<patch>"
    },
    "name": "update_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
patchYesThe fields to change; omitted fields stay as they are. Each field's limit is in its schema.
draftIdYesThe draft's id (starts with drf_), as returned by list_drafts or create_draft.
entryIdYesThe Entry's id (starts with ent_), as returned by list_entries.
baseRevisionYesThe draft revision the change is made against. If the draft has been saved since, the call fails with a conflict and the current revision.

Output Schema

NameRequiredDescriptionDefault
codeNoOnly when the call failed (isError): the error code, e.g. conflict, forbidden, not_found, validation_failed, rate_limited.
draftNo
detailsNoOnly when the call failed: conflict has revision, forbidden has requiredScope, rate_limited has retryAfter (seconds), validation_failed has problems; a refused page bundle has errors (code, path, detail, fix for each) and a stale page revision has revision.
messageNoOnly when the call failed: what went wrong and what to do.
problemsNoFields that were refused when the others were applied: { field: reason }.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / patch / properties / body / description
      Previous value: -"The text, as Markdown: ## headings, - and 1. lists, > quotes, *em*, **strong**, `code`, [links](https://...), [^1] notes and ``` code blocks with an optional language. A block opened with ```prompt is a prompt: shown labelled, with a Copy button, for the reader to paste into an assistant. At most 60,000 characters."New value: +"The text, as Markdown: ## headings, - and 1. lists, > quotes, *em*, **strong**, `code`, [links](https://...), [^1] notes and ``` code blocks with an optional language. A block opened with ```prompt is a prompt: shown labelled, with a Copy button, for the reader to paste into an assistant. A picture or an embed is one line of its own: ![description](target \"optional caption\"). The target is image:<key> for a picture added to this draft with the add-image call (POST /v1/me/entries/{entryId}/drafts/{draftId}/images, or the add_draft_image tool, which answers the key and this line), or just an https address: an X post (x.com/<handle>/status/<id>), a GitHub repository (github.com/<owner>/<repo>), a YouTube or Vimeo video, or a link to a video file ending .mp4, .m4v, .webm or .mov, which becomes a card or a video. An embed line needs only the address (![](https://github.com/vercel/next.js)); Entry reads the card itself. The description is the alt text. A post holds at most 3 pictures on the Free plan and 30 on Pro, and at most 20 embeds and videos together; a picture key that is not this draft's is refused. At most 60,000 characters."
    • changedOutput schema / properties / draft / properties / body / description
      Previous value: -"The text, as Markdown: ## headings, - and 1. lists, > quotes, *em*, **strong**, `code`, [links](https://...), [^1] notes and ``` code blocks with an optional language. A block opened with ```prompt is a prompt: shown labelled, with a Copy button, for the reader to paste into an assistant."New value: +"The text, as Markdown: ## headings, - and 1. lists, > quotes, *em*, **strong**, `code`, [links](https://...), [^1] notes and ``` code blocks with an optional language. A block opened with ```prompt is a prompt: shown labelled, with a Copy button, for the reader to paste into an assistant. A picture or an embed is one line of its own: ![description](target \"optional caption\"). The target is image:<key> for a picture added to this draft with the add-image call (POST /v1/me/entries/{entryId}/drafts/{draftId}/images, or the add_draft_image tool, which answers the key and this line), or just an https address: an X post (x.com/<handle>/status/<id>), a GitHub repository (github.com/<owner>/<repo>), a YouTube or Vimeo video, or a link to a video file ending .mp4, .m4v, .webm or .mov, which becomes a card or a video. An embed line needs only the address (![](https://github.com/vercel/next.js)); Entry reads the card itself. The description is the alt text. A post holds at most 3 pictures on the Free plan and 30 on Pro, and at most 20 embeds and videos together; a picture key that is not this draft's is refused."
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already flag the operation as destructive, non-read-only, and idempotent, and the description adds substantial context beyond them: the optimistic-concurrency contract (nothing is written on a stale baseRevision, a conflict with the current revision is returned), that the live post is untouched, and the required drafts:write scope. These are exactly the operational facts an agent needs before retrying or assuming success.

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?

The write/scope statement is front-loaded, followed by the patch semantics, then the conflict behavior, then the exclusion. Every sentence carries a distinct fact; nothing is padding, and no sentence merely restates the title or annotations.

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

Completeness5/5

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

For a four-parameter mutating tool with a fully documented nested patch object, an output schema, and rich annotations, the description covers the remaining gaps: concurrency failure mode, write scope, side effects on the live post, and the boundary against publishing. An agent could call and safely retry it from this text alone.

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?

Schema coverage is 100% and the nested patch properties are thoroughly documented, so the baseline is 3. The description earns above that by explaining the non-obvious replace semantics: only patch fields change, each field replaces its stored value whole, and patch.body is the complete new text rather than a diff — a distinction the schema alone does not convey.

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?

"Saves changes to a draft, or to the working copy of a published post, at a given baseRevision" names the verb, the resource, and the dual target (draft vs. working copy), so the agent can separate this from create_draft, get_draft, and publishing tools. The distinction from publishing is stated explicitly later in the description.

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

Usage Guidelines4/5

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

The description supplies a clear when-not: "Publishing, unpublishing and changes to the live profile are made only by the owner, in Entry," which tells the agent this tool cannot publish. It does not name sibling tools such as create_draft or get_draft as alternatives, so routing between read/create/update relies on the verb in the sentence rather than explicit signposting.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.