Skip to main content
Glama
mpeirone

zabbix-mcp-server

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
NameRequiredDescriptionDefault
emailNo
nameNo
surnameNo
useridYes
usernameNo

Implementation Reference

  • 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)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mpeirone/zabbix-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server