user_update
Modify user details in Zabbix by updating username, name, surname, or email using the specified user ID. Returns JSON-formatted update results for streamlined user management.
Instructions
Update an existing user in Zabbix.
Args:
userid: User ID to update
username: New username
name: New first name
surname: New last name
email: New email address
Returns:
str: JSON formatted update result
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| No | |||
| name | No | ||
| surname | No | ||
| userid | Yes | ||
| username | No |
Implementation Reference
- src/zabbix_mcp_server.py:979-1010 (handler)The `user_update` MCP tool implementation. This function is decorated with `@mcp.tool()` which registers it as an MCP tool named 'user_update'. It handles updating Zabbix user information (username, name, surname, email) using the Zabbix API client, with read-only validation and JSON response formatting.@mcp.tool() def user_update(userid: str, username: Optional[str] = None, name: Optional[str] = None, surname: Optional[str] = None, email: Optional[str] = None) -> str: """Update an existing user in Zabbix. Args: userid: User ID to update username: New username name: New first name surname: New last name email: New email address Returns: str: JSON formatted update result """ validate_read_only() client = get_zabbix_client() params = {"userid": userid} if username: params["username"] = username if name: params["name"] = name if surname: params["surname"] = surname if email: params["email"] = email result = client.user.update(**params) return format_response(result)