Run macro

Apply a macro to a ticket, as the Update menu does.

MCP tool zammad_write → run_macro

write Confirm

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

Parameters: run_macro
NameTypeDescription
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

JSON-RPC

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "zammad_write",
    "arguments": {
      "operation": "run_macro",
      "arguments": {
        "ticket_id": 1,
        "macro": "macro"
      }
    }
  }
}

Example response

JSON

{
  "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
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.