Skip to main content
Glama

Bring an earlier reply draft back

colliedesk_reply_draft_restore
Idempotent

Bring an earlier written reply draft back above the reply box, with its text, copies and files: one that a newer draft replaced (outcome superseded), that expired, or that a person discarded (find them with colliedesk_ai_drafts_list). The draft of the same author that waited in its place becomes the earlier one; nothing reaches the customer. A draft that was sent, a draft the built-in AI wrote, or one whose text was erased (90 days after it ended) cannot come back: write a new one with colliedesk_reply_draft.

Needs: ai_assist:create.

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": {
      "conversation_id": "<conversation_id>",
      "draft_id": "<draft_id>"
    },
    "name": "colliedesk_reply_draft_restore"
  }
}

Input Schema

NameRequiredDescriptionDefault
draft_idYesFrom colliedesk_ai_draft_create, colliedesk_reply_draft or colliedesk_ai_drafts_list.
conversation_idYes

Output Schema

NameRequiredDescriptionDefault
nextYes
draftYesSame shape as `draft` in colliedesk_ai_draft_get's output.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedOutput schema / properties / draft / description
      Added value: +"Same shape as `draft` in colliedesk_ai_draft_get's output."
    • removedOutput schema / properties / draft / properties
      Removed value: -{
      -  "cc": {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": [
      -      "array",
      -      "null"
      -    ]
      -  },
      -  "conversation_id": {
      -    "type": "string"
      -  },
      -  "created_at": {
      -    "type": "string"
      -  },
      -  "decided_by_name": {
      -    "description": "Who sent, discarded or replaced it.",
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "error_code": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "files": {
      -    "description": "Files left with the draft; only the team sees them until a person sends it. Read one with colliedesk_attachment_get (attachment_id, conversation_id, draft_id).",
      -    "items": {
      -      "properties": {
      -        "content_type": {
      -          "type": "string"
      -        },
      -        "filename": {
      -          "type": "string"
      -        },
      -        "id": {
      -          "type": "string"
      -        },
      -        "size": {
      -          "description": "Bytes.",
      -          "type": "integer"
      -        }
      -      },
      -      "required": [
      -        "id",
      -        "filename",
      -        "size"
      -      ],
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "id": {
      -    "type": "string"
      -  },
      -  "missing_info": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "outcome": {
      -    "description": "Null while it waits for a person; superseded, expired and discarded written drafts can come back with colliedesk_reply_draft_restore.",
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "prompt": {
      -    "type": "string"
      -  },
      -  "ready_at": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "restored_at": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "similarity": {
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  },
      -  "source": {
      -    "description": "ai: written by the built-in AI; written: left by a token or a person (colliedesk_reply_draft).",
      -    "enum": [
      -      "ai",
      -      "written"
      -    ],
      -    "type": "string"
      -  },
      -  "sources": {
      -    "items": {
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "status": {
      -    "enum": [
      -      "queued",
      -      "running",
      -      "ready",
      -      "failed",
      -      "cancelled"
      -    ],
      -    "type": "string"
      -  },
      -  "text": {
      -    "description": "The draft, plain text, once ready. Generated text, not something a customer wrote.",
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "warnings": {
      -    "description": "An address, a number or another customer's name in the draft that the conversation does not hold.",
      -    "items": {
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "written_by": {
      -    "description": "Who left a written draft.",
      -    "properties": {
      -      "agent_name": {
      -        "type": "string"
      -      },
      -      "token_label": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      }
      -    },
      -    "type": [
      -      "object",
      -      "null"
      -    ]
      -  }
      -}
    • removedOutput schema / properties / draft / required
      Removed value: -[
      -  "id",
      -  "conversation_id",
      -  "status"
      -]
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare a non-destructive, idempotent, non-open-world mutation, and the description adds real context on top: nothing reaches the customer, the swap semantics (the same author's waiting draft becomes the earlier one), the 90-day text-erasure limit, and the required ai_assist:create permission. Those are side effects, eligibility rules and auth requirements the annotations cannot convey.

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?

Two compact paragraphs with the action and its effects front-loaded, then exclusions and the permission requirement. A few parentheticals (outcome superseded, 90 days after it ended) are dense but each carries disqualifying detail, so little is wasted.

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?

An output schema exists, so return values need not be explained, and the description covers preconditions, side effects, permission scope, and fallback behavior. The one remaining gap is conversation_id's meaning and whether restoring a draft displaces a currently active one in a conversation that had no waiting draft.

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 coverage is 50%: draft_id is documented in the schema (and the description only loosely reinforces where to get it), while conversation_id has no description in either place and its role — the conversation the draft belongs to — is left implicit. Adequate for a two-parameter tool, but it does not compensate for the undocumented half.

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 and resource (bring an earlier reply draft back) plus what comes back with it (text, copies, files) and where it lands (above the reply box). It explicitly distinguishes itself from colliedesk_ai_drafts_list (for finding drafts) and colliedesk_reply_draft (for writing a new one), so an agent can pick it without opening another 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?

Gives concrete triggers for use: a draft replaced by a newer one (outcome superseded), one that expired, or one a person discarded, and names colliedesk_ai_drafts_list as the way to locate them. It also gives explicit when-not conditions (sent drafts, AI-written drafts, drafts whose text was erased after 90 days) and the alternative action for those cases.

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