Run macro
Apply a macro to a ticket, as the Update menu does.
MCP tool zammad_write → run_macro
Applies the named macro to the ticket at once and returns the ticket afterwards. A macro can change state, priority, group and owner, add tags and notes, send a notification or run an AI agent, so what happens depends on how your admin built it. If the ticket lacks a required attribute that the macro does not set, Zammad applies none of its actions and the call returns that error. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| ticket_id integer required | integer | Ticket ID from search_tickets, list_overview_tickets or the ticket address (#ticket/zoom/{ticket_id}). |
| macro string required | string | Macro name from list_macros. |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "zammad_write",
"arguments": {
"operation": "run_macro",
"arguments": {
"ticket_id": 1,
"macro": "macro"
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"ticket_id": 4830,
"macro": "Close & Tag as Spam",
"state": "closed",
"owner": "Nora Weiss",
"tags": [
"spam"
]
},
"isError": false
}