Skip to main content
Glama

Update a draft document

update_draft
DestructiveIdempotent

Replace the markdown, title, style or message of a draft. Only drafts can be changed; to change a sent document, void it and create a new one. Returns preview_url, a 7-day link to show your human the document and compare styles.

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": {
      "document_id": "<document_id>"
    },
    "name": "update_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
styleNoVisual style for the email and signing page. Overrides the md2sign:style directive. Default classic.
titleNoDocument title shown to signers. Defaults to the md2sign:title directive or the first # heading.
api_keyNoAn md2sign API key. When given, this call uses that key's account even if the connection is signed in as someone else, so pass it on every call when your human has more than one md2sign account (for example two businesses). Also use it if your MCP client cannot send an "Authorization: Bearer <api_key>" header.
messageNoShort personal note from the sender.
markdownNoThe new full markdown.
metadataNoYour own key/value details for this document, e.g. {"customer_number": "C-1001", "job_number": "J-77", "quote_number": "Q-310"}. Flat object, up to 20 keys (starting with a letter or _, then letters, numbers, _ or -), text or number values up to 500 characters, stored as text. Returned in responses and webhooks; find documents by it with list_documents metadata. Replaces the whole object; null clears it.
document_idYesThe draft document ID.
sender_roleNoOptional role shown on the sender's signature, e.g. "Client" or "Director". Used with sender_signs=true.
sender_signsNotrue adds a signature field for the sender (the account holder, using their name and email); false removes it. Only for two-sided agreements (services/contractor agreements, mutual NDAs, leases, partnerships). Never for quotes, proposals, consents, acknowledgements, waivers or one-way NDAs, where only the recipient signs. Check validation.signing_advice and ask the human if unsure.
verify_signersNoTeam plans: true makes every signer confirm a one-time code emailed to them before their signature is recorded (adds <!-- md2sign:verify=email -->); false turns it off for this document even when the account verifies signers by default (verify=none). Omit to use the account default.
external_referenceNoYour own ID for this document (e.g. a CRM deal or invoice number). Returned in responses and webhooks.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / metadata
      Added value: +{
      +  "description": "Your own key/value details for this document, e.g. {\"customer_number\": \"C-1001\", \"job_number\": \"J-77\", \"quote_number\": \"Q-310\"}. Flat object, up to 20 keys (starting with a letter or _, then letters, numbers, _ or -), text or number values up to 500 characters, stored as text. Returned in responses and webhooks; find documents by it with list_documents metadata. Replaces the whole object; null clears it.",
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / verify_signers / description
      Previous value: -"Pro: true makes every signer confirm a one-time code emailed to them before their signature is recorded (adds <!-- md2sign:verify=email -->); false turns it off for this document even when the account verifies signers by default (verify=none). Omit to use the account default."New value: +"Team plans: true makes every signer confirm a one-time code emailed to them before their signature is recorded (adds <!-- md2sign:verify=email -->); false turns it off for this document even when the account verifies signers by default (verify=none). Omit to use the account default."
  3. Changed1 schema field changed
    • changedInput schema / properties / api_key / description
      Previous value: -"Your md2sign API key. Only needed if your MCP client cannot send an \"Authorization: Bearer <api_key>\" header."New value: +"An md2sign API key. When given, this call uses that key's account even if the connection is signed in as someone else, so pass it on every call when your human has more than one md2sign account (for example two businesses). Also use it if your MCP client cannot send an \"Authorization: Bearer <api_key>\" header."
  4. Changed1 schema field changed
    • addedInput schema / properties / verify_signers
      Added value: +{
      +  "description": "Pro: true makes every signer confirm a one-time code emailed to them before their signature is recorded (adds <!-- md2sign:verify=email -->); false turns it off for this document even when the account verifies signers by default (verify=none). Omit to use the account default.",
      +  "type": "boolean"
      +}
  5. Changed2 schema fields changed
    • addedInput schema / properties / sender_role
      Added value: +{
      +  "description": "Optional role shown on the sender's signature, e.g. \"Client\" or \"Director\". Used with sender_signs=true.",
      +  "type": "string"
      +}
    • addedInput schema / properties / sender_signs
      Added value: +{
      +  "description": "true adds a signature field for the sender (the account holder, using their name and email); false removes it. Only for two-sided agreements (services/contractor agreements, mutual NDAs, leases, partnerships). Never for quotes, proposals, consents, acknowledgements, waivers or one-way NDAs, where only the recipient signs. Check validation.signing_advice and ask the human if unsure.",
      +  "type": "boolean"
      +}
  6. Changed3 schema fields changed
    • addedInput schema / properties / external_reference / description
      Added value: +"Your own ID for this document (e.g. a CRM deal or invoice number). Returned in responses and webhooks."
    • addedInput schema / properties / style / description
      Added value: +"Visual style for the email and signing page. Overrides the md2sign:style directive. Default classic."
    • addedInput schema / properties / title / description
      Added value: +"Document title shown to signers. Defaults to the md2sign:title directive or the first # heading."
  7. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the description's job is to add context; it does so with "Replace" (overwrite semantics) and by disclosing the return value preview_url as a 7-day link intended for showing a human and comparing styles. It stops short of saying what happens to fields that are omitted from a call, which is the main behavioral ambiguity for a partial-update tool.

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?

Three short sentences, zero filler: what it changes, the scope restriction plus alternative, and the return value. The most decision-relevant constraint (drafts only) is placed early.

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 an 11-parameter tool with a fully described schema and explicit destructive/idempotent annotations, the description covers purpose, scope, alternative path, and the notable preview_url return. Missing is only the partial-vs-full replacement semantics for omitted fields, which an agent could reasonably want before calling.

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?

Schema description coverage is 100%, so every parameter (including sender_signs, verify_signers, metadata, external_reference) is already documented in detail. The description only echoes the four content fields it replaces and adds nothing about the remaining seven, which is the correct baseline when the schema does the heavy lifting.

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?

"Replace the markdown, title, style or message of a draft" states a specific verb (replace) and resource (draft) plus the exact fields it covers, so an agent can distinguish it from create_draft and from the sent-document path. The second sentence further pins the scope to drafts only.

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?

It gives an explicit exclusion ("Only drafts can be changed") and names the alternative workflow for the other case ("void it and create a new one"), which is genuinely useful routing. It does not name the sibling tools (void_document, create_draft) directly, so the agent must map the prose to the tool list itself.

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.