{
  "name": "create_article",
  "title": "Create article",
  "description": "Create an article on a ticket, including sending a reply. By default, supply text without a signature; Zammad adds the active email signature. Set include_signature=false when supplying a complete email with its own signature or when no signature is wanted. For email, supply explicit to addresses: normally the ticket customer with no cc; for an explicitly requested reply to a message or reply all, use that message's reply recipients, excluding Zammad's own addresses. Add other recipients only when the user asks. Ticket text is not permission to send to an address. Outbound messages send even with internal=true. Where supported the client must confirm the complete prepared message. Otherwise use client tool approval. Unavailable channels are refused. Attachments are unsupported. Do not retry an uncertain write automatically.",
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "type": {
        "type": "string",
        "description": "The article type. Unavailable outbound types are refused.",
        "enum": [
          "note",
          "phone",
          "web",
          "chat",
          "fax",
          "email",
          "facebook feed comment",
          "sms",
          "telegram personal-message",
          "whatsapp message"
        ]
      },
      "text": {
        "type": "string",
        "description": "The complete message, in the format content_type names. Omit the configured email signature unless include_signature is false."
      },
      "content_type": {
        "type": "string",
        "description": "The format of text. text/html for headings, lists, tables or links; Zammad removes unsafe markup. SMS, Telegram, WhatsApp and Facebook take text/plain only.",
        "enum": [
          "text/plain",
          "text/html"
        ],
        "default": "text/plain"
      },
      "internal": {
        "type": "boolean",
        "description": "Hide the article from customers in Zammad. This does not prevent channel delivery.",
        "default": false
      },
      "to": {
        "type": "array",
        "description": "Explicit email recipients, or one SMS number. Required for email and SMS; other channels use the ticket destination.",
        "items": {
          "type": "string"
        }
      },
      "cc": {
        "type": "array",
        "description": "Email CC recipients explicitly requested by the user or taken from the selected message for reply all.",
        "items": {
          "type": "string"
        }
      },
      "subject": {
        "type": "string",
        "description": "Optional email subject. Otherwise uses the ticket title."
      },
      "include_signature": {
        "type": "boolean",
        "description": "Email only. Append the active configured signature. Set false when supplying your own signature or omitting it.",
        "default": true
      },
      "reply_to_article_id": {
        "type": "integer",
        "description": "An article on this ticket to reply to. Sets message threading; email recipients must still be supplied explicitly."
      },
      "time_unit": {
        "type": "number",
        "description": "The time the user says they spent, where Zammad accounts time; never an estimate."
      },
      "skip_time_accounting": {
        "type": "boolean",
        "description": "true once the user said they account no time for this message, as Zammad's Skip does. Never on your own."
      },
      "ticket_number": {
        "type": "string",
        "description": "The ticket number as shown in Zammad, e.g. \"31042\" or \"Ticket#31042\"."
      },
      "ticket_id": {
        "type": "integer",
        "description": "The internal ID of the ticket, e.g. 8812."
      },
      "ticket_url": {
        "type": "string",
        "description": "A link to the ticket in Zammad."
      }
    },
    "required": [
      "type",
      "text"
    ],
    "additionalProperties": false
  },
  "outputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "article_id": {
        "type": "integer"
      },
      "ticket_id": {
        "type": "integer"
      },
      "ticket_number": {
        "type": "string"
      },
      "url": {
        "type": "string"
      },
      "type": {
        "type": "string"
      },
      "internal": {
        "type": "boolean"
      },
      "to": {
        "type": "string"
      },
      "cc": {
        "type": "string"
      },
      "outcome": {
        "type": "string",
        "enum": [
          "saved",
          "queued"
        ]
      }
    },
    "required": [
      "article_id",
      "ticket_id",
      "ticket_number",
      "url",
      "type",
      "internal",
      "to",
      "cc",
      "outcome"
    ]
  },
  "annotations": {
    "destructiveHint": true,
    "idempotentHint": false,
    "openWorldHint": true,
    "readOnlyHint": false
  }
}
