Skip to main content
Glama

Re-deliver draft to CMS

deliver_draft
DestructiveIdempotent

Re-deliver one already approved article to the workspace's destination as a draft: a file in its git repository, or a draft document in its Sanity dataset. approve_post already delivers on approval, so this is the retry and the re-send after an edit, not the normal path. Requires the last run_gate check to have passed and the article to be ready (approve_post first); otherwise it refuses with degraded reason gate-failed or not-ready. It never publishes, never deletes and never removes the draft flag: publishing stays the human's. Git (provider github): the file is written with draft: true forced, whatever key the destination maps that to. On a git destination, an article already marked published (from the seodraft app or by hand), or whose file in the repository is already live (its draft key is not true), refuses with degraded reason published, because a draft file would take the live article offline. Delivering the same article again overwrites the same path, so it is safe to repeat. Over a file already in the repository it keeps that file's publish date, its translation key and every frontmatter key the mapping does not write (aiRole, process, anything set in the CMS); a linked article whose file has no translation key yet takes the one its translation's file carries, else the English article's slug. If the slug changed since the last delivery the new path is written and previousPath names the old file, which is left in place for the human to delete. Returns path, commitSha, htmlUrl (the file on GitHub), commitUrl, updated (false on the first delivery) and pendingImageSlots: the pictures the article asked for and nobody uploaded, which the human adds in the CMS. Sanity (provider sanity): it creates or patches the draft drafts.seodraft-<id>; re-delivering patches only the fields seodraft maps, so an author, category or image set in Studio survives. Returns documentId, studioUrl (opens the draft in Studio), updated, pendingImageSlots and degradations: what the destination's Portable Text could not carry (kind image-skipped with the image URL, or converter with what was flattened), which the human fixes in Studio. Other degraded reasons: no-target (nothing configured in Profile -> Publishing), no-token, secrets-key-missing, github-error or sanity-error (with status and the CMS's own message).

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": {
      "id": "<id>"
    },
    "name": "deliver_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
workspaceIdNoThe workspace this call acts on, as listed by list_workspaces. Left out, the call uses the workspace the account is in right now.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / workspaceId
      Added value: +{
      +  "description": "The workspace this call acts on, as listed by list_workspaces. Left out, the call uses the workspace the account is in right now.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare write/idempotent/destructive/open-world; the description goes far beyond them, spelling out exact mutation semantics (same path overwritten, previousPath left in place when the slug changes, frontmatter keys, publish date and translation key preserved, Sanity patches limited to seodraft-mapped fields), the full degraded-reason vocabulary (`published`, `no-target`, `no-token`, `secrets-key-missing`, `github-error`, `sanity-error`), and the 'never publishes, never deletes, never clears the draft flag' boundary. Nothing here contradicts destructiveHint=true, since overwriting repository/CMS content is exactly the destructive surface it warns about.

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

Conciseness4/5

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

Purpose and the approve_post contrast are front-loaded, and nearly every sentence carries operational payload (conditions, preserved keys, degraded reasons, return fields). It is a single dense block, however: the provider-specific Git and Sanity sections would scan far better as separated lines, and some parenthetical clauses are heavily nested.

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?

No output schema exists, yet the description fully enumerates return fields for both providers (path, commitSha, htmlUrl, commitUrl, updated, pendingImageSlots; documentId, studioUrl, degradations) and explains what each means to the human. For a tool with two destination modes, prerequisite gates and many failure codes, the definition leaves no material question for an agent deciding whether and how to call it.

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

Parameters3/5

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

With 50% schema description coverage, the schema documents workspaceId (defaults to the current workspace) but not `id`. The description implies `id` targets 'one already approved article' but never states the parameter's type, source (e.g., a post id from list_posts), or whether it is the article or a content-map entry. A 3 is the ceiling given the schema carries most of the load and the description adds only inferential meaning.

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?

The first sentence names a specific verb and resource ('Re-deliver one already approved article to the workspace's destination as a draft') and immediately scopes it to two concrete destination kinds (git file vs Sanity draft document). It explicitly distinguishes itself from approve_post ('approve_post already delivers on approval, so this is the retry and the re-send after an edit, not the normal path'), so an agent can route correctly without opening a sibling schema.

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?

States the normal path (approve_post) and why this is not it, plus hard preconditions: the last run_gate check must have passed and the article must be ready via approve_post, else it refuses with `gate-failed` or `not-ready`. It also names when it must not be used (publishing, deleting) and enumerates refusal conditions such as an already-published article on a git destination.

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.

Resources