template_delete
Remove templates from Zabbix by specifying their IDs. Returns a JSON-formatted result confirming the deletion success. Ideal for managing template cleanup in Zabbix monitoring systems.
Instructions
Delete templates from Zabbix.
Args:
templateids: List of template IDs to delete
Returns:
str: JSON formatted deletion result
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| templateids | Yes |
Input Schema (JSON Schema)
{
"properties": {
"templateids": {
"items": {
"type": "string"
},
"title": "Templateids",
"type": "array"
}
},
"required": [
"templateids"
],
"type": "object"
}
Implementation Reference
- src/zabbix_mcp_server.py:693-707 (handler)The handler function implementing the 'template_delete' MCP tool. It validates read-only mode, gets the Zabbix client, deletes the specified templates via the Zabbix API, and returns a formatted JSON response.@mcp.tool() def template_delete(templateids: List[str]) -> str: """Delete templates from Zabbix. Args: templateids: List of template IDs to delete Returns: str: JSON formatted deletion result """ validate_read_only() client = get_zabbix_client() result = client.template.delete(*templateids) return format_response(result)