host_delete
Remove hosts from Zabbix monitoring by specifying host IDs. Returns a JSON-formatted result confirming successful deletions for efficient system management.
Instructions
Delete hosts from Zabbix.
Args:
hostids: List of host IDs to delete
Returns:
str: JSON formatted deletion result
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hostids | Yes |
Input Schema (JSON Schema)
{
"properties": {
"hostids": {
"items": {
"type": "string"
},
"title": "Hostids",
"type": "array"
}
},
"required": [
"hostids"
],
"type": "object"
}
Implementation Reference
- src/zabbix_mcp_server.py:223-237 (handler)The host_delete tool handler, decorated with @mcp.tool() for MCP registration. It validates read-only mode, gets the Zabbix client, deletes the specified hosts using the Zabbix API, and returns a formatted JSON response.@mcp.tool() def host_delete(hostids: List[str]) -> str: """Delete hosts from Zabbix. Args: hostids: List of host IDs to delete Returns: str: JSON formatted deletion result """ validate_read_only() client = get_zabbix_client() result = client.host.delete(*hostids) return format_response(result)