Skip to main content
Glama

apply_macro

Apply a Zendesk macro to a ticket to update fields and comments, or preview the resulting changes before committing.

Instructions

Apply a macro to a ticket (or preview its effect). Find macros with list_resources(resource='macros') or search via api_request GET macros/search?query=...

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>",
      "macro_id": "<macro_id>"
    },
    "name": "apply_macro"
  }
}

Input Schema

NameRequiredDescriptionDefault
macro_idYes
ticket_idYes
preview_onlyNotrue = just show what the macro would change.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, openWorldHint=true and idempotentHint=false, so the safety profile is largely covered. The description adds the preview-before-apply idea (though preview_only is also documented in the schema) but says nothing about which ticket fields get overwritten, whether prior values are recoverable, or what happens on repeated application.

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 sentences, with the core action and the preview alternative front-loaded. The trailing 'search via api_request GET macros/search?query=...' is slightly terse and syntax-heavy but still earns its place as a discovery shortcut.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and a low-coverage input schema, the description needs to carry more weight. It adequately covers obtaining a macro and previewing, but omits what the apply operation returns or changes and how errors or partial applications are surfaced, leaving meaningful gaps for a mutation tool.

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 description coverage is only 33%: ticket_id and macro_id have no schema descriptions. The description partially compensates by explaining how to discover macro_id and by framing ticket_id as the ticket being modified, but it leaves ID format and whether ticket_id accepts a numeric ID only entirely implicit.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Apply a macro to a ticket') and immediately covers the preview variant. It is clear what the tool does without opening the schema, though it does not distinguish itself from other mutation tools such as blueprint_apply or bulk_update_tickets.

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 gives actionable guidance on sourcing the macro_id, pointing to list_resources(resource='macros') and an api_request search path, and it explains the preview_only option. It stops short of stating when to prefer applying a macro over other ticket-mutation tools or when preview should be mandatory.

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