hostgroup_delete
Remove specified host groups from Zabbix by providing their group IDs. Returns a JSON-formatted result confirming the deletion process.
Instructions
Delete host groups from Zabbix.
Args:
groupids: List of group IDs to delete
Returns:
str: JSON formatted deletion result
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| groupids | Yes |
Implementation Reference
- src/zabbix_mcp_server.py:306-320 (handler)The handler function for the hostgroup_delete tool. It checks if the server is in read-only mode, retrieves the Zabbix API client, calls the hostgroup.delete method with the provided groupids, and returns a JSON-formatted response.@mcp.tool() def hostgroup_delete(groupids: List[str]) -> str: """Delete host groups from Zabbix. Args: groupids: List of group IDs to delete Returns: str: JSON formatted deletion result """ validate_read_only() client = get_zabbix_client() result = client.hostgroup.delete(*groupids) return format_response(result)