set_maintenance
Create a maintenance window in Zabbix to suppress new problem notifications for hosts, selected by location tag or explicit host names.
Instructions
Create a Zabbix maintenance window, selecting hosts by location tag OR by explicit host name (exactly one of the two -- not both, not neither).
Unlike acknowledge_problem (which only marks existing problems as seen), this suppresses NEW problem notifications for the matched hosts during the window.
IMPORTANT -- idempotency key is name + since (not the target): the two
selection modes (location vs. hosts) can't collide with each other, but
within the SAME mode, calling again with the same name/since always
returns the FIRST window created under that name/since, even if this
call's location/hosts is different. A second call with a different
target but a name/since that collides with an earlier one (same mode)
silently protects nothing for the new target (no error, no window
created for it) -- pick a name that uniquely identifies the actual
target whenever more than one maintenance might be open around the same
time (shigechika/zapi-mcp#59).
IMPORTANT -- since/till are naive local-server-time strings: parsed and converted via the MCP server process's own timezone, not a fixed zone. If the server doesn't run in the timezone you mean, convert first.
Args: since: Window start, "%Y/%m/%d %H:%M:%S" (e.g. "2026/08/10 11:00:00"), interpreted in the MCP server process's local timezone till: Window end, "%Y/%m/%d %H:%M:%S", same timezone caveat as since name: Maintenance window name prefix (the start time is appended). Also the idempotency key together with since -- see above description: Free-text reason, shown in the Zabbix UI location: Value of the hosts' "location" tag to match (e.g. "CIT"). Mutually exclusive with hosts. hosts: Comma-separated exact host (technical) names, for when the affected hosts don't share a location tag or precise host-level control is wanted. No per-port selection. Mutually exclusive with location.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| till | Yes | ||
| hosts | No | ||
| since | Yes | ||
| location | No | ||
| description | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |