Skip to main content
Glama
zammad-mcp
by BM1-de

zammad_create_shared_draft

Create or overwrite a Zammad ticket’s shared draft as a Reply-All email, automatically deriving recipients, subject, and quoted history from the latest customer article.

Instructions

Create or overwrite the shared draft of a Zammad ticket as a Reply-All email. Auto-detects the most recent customer article and derives to/cc/subject/in_reply_to from it: to is its sender, cc its other To and Cc recipients without ZAMMAD_SELF_EMAILS. Renders the agent's signature fresh from Zammad (with placeholder substitution and lazy loading of related objects) and appends the original article as a localised , by default stripped of the conversation history the sender quoted themselves (quote_history). PUT semantics: any existing draft on the ticket is overwritten, unless keep_existing is true. The signature defaults to the one configured on the ticket's group. reply_html validation (always on for universal rules, conditional for configured ones): - universal: no top-level , no , no typed bullet lists (lines starting with - – • *; use ), no ASCII straight quotes ", no ASCII apostrophe ' inside words - when ZAMMAD_BANNED_NAMES is set: body must not contain any banned name - when ZAMMAD_REQUIRED_GREETING is set: body must contain that greeting

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": {
      "ticket_id": "<ticket_id>",
      "reply_html": "<reply_html>"
    },
    "name": "zammad_create_shared_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
sign_asNoLogin or e-mail of the agent whose name goes into signature and From display name (default: ZAMMAD_SIGN_AS, else the token owner). For service accounts drafting on behalf of a person.
extra_ccNoAdditional CC addresses to add on top of the automatic Reply-All set.
ticket_idYesZammad ticket ID (numeric, from URL: /#ticket/zoom/<id>).
reply_htmlYesReply body as HTML with a nested <div> structure. Example: <div><div>Hello Mr Smith,</div><div><br></div><div>thank you for your message ...</div><div><br></div><div>Best regards</div></div>. Lists: <div><ul><li>First</li><li>Second</li></ul></div> with <div><br></div> before and after — never lines starting with a dash. End with the greeting; the empty line before the signature is added automatically.
quote_localeNoLocale for the quote block lead-in. 'en' → "On Tuesday, 9 June 2026 at 10:00:00, X wrote:". 'de' → "Am Dienstag, 09. Juni 2026 um 10:00:00, schrieb X:". When omitted, falls back to ZAMMAD_QUOTE_LOCALE (server default).
signature_idNoSignature ID from /signatures. When omitted, the signature of the ticket's group is used (fallback 1). Zammad appends the group signature again below the quote if a different one is set.
keep_existingNoIf true and the ticket already has a shared draft, leave it untouched and return error DRAFT_EXISTS instead of overwriting it (for automated runs).
quote_historyNoHow much of the referenced article to quote. 'trim' keeps only what the sender wrote in that message and drops the conversation history they quoted themselves — keeps long threads short. 'full' quotes the article verbatim. When omitted, falls back to ZAMMAD_QUOTE_HISTORY (server default: 'trim').

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.2
  2. Removedv0.1.1
  3. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: recipient auto-derivation (sender becomes To, other To/Cc become Cc minus ZAMMAD_SELF_EMAILS), fresh signature rendering with placeholder substitution and lazy loading, an appended localised blockquote, overwrite semantics, and the exact validation rules that can reject reply_html. These are non-obvious failure modes an agent could not infer from the schema alone.

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 auto-detection are front-loaded, and the bulleted validation block is dense but each rule maps to an actual rejection cause. Some material, such as the two localised quote lead-in examples, duplicates what the enum descriptions already say and could be trimmed.

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 8-parameter mutation tool with no annotations and no output schema, the description covers defaults, side effects, and validation thoroughly. The remaining gap is the return value: aside from the DRAFT_EXISTS error, an agent is not told what a successful call yields (draft ID, article ID, or nothing).

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%, so the baseline is 3, but the description adds interaction meaning the schema cannot: it explains that to/cc/subject/in_reply_to are derived rather than supplied, that keep_existing converts an overwrite into a DRAFT_EXISTS error, and that the signature defaults to the ticket group's configured signature. quote_locale and quote_history are only echoed, not enriched, which keeps it off a 5.

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 (create or overwrite), a specific resource (the shared draft of a Zammad ticket), and the output form (a Reply-All email). That is enough for an agent to separate it from drafting-once or internal-note tools without opening the schema.

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 states PUT semantics explicitly and gives the one condition that changes the outcome (keep_existing=true returns DRAFT_EXISTS instead of overwriting), which is real when/when-not guidance for automated runs. It never names an alternative sibling tool or says when a different drafting approach is preferable, so it stops short of full routing guidance.

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