user_checkauthentication
Check whether a Zabbix session is still valid and return the authenticated user's details, so you can verify credentials before making further API calls.
Instructions
Check whether a session is still valid. Returns the authenticated user's details if so. Requires auth_sessionid to be set to a session id (typically from a prior user.login); the configured server credentials (api_token or username/password) cannot validate against the session table.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"auth_sessionid": "<auth_sessionid>"
},
"name": "user_checkauthentication"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | No | A Zabbix API token to check instead of a session id (do not send both). | |
| extend | No | Whether checking a session also extends its lifetime (Zabbix default: true). Not used with 'token'. | |
| server | No | Target Zabbix server. Available: default. Defaults to 'default' if omitted. | |
| raw_json | No | Strips the security disclaimer preamble from the response so it is pure JSON. Default: false. Requires the bearer token to have 'allow_raw_json' explicitly enabled by an operator in the admin portal - tokens without that policy receive a PolicyError instead. WARNING: setting true bypasses the prompt-injection mitigation marker that wraps untrusted Zabbix data (host names, item descriptions, problem text). LLM clients (Claude, GPT, Cursor, ...) should leave this false; only programmatic non-LLM consumers (Python scripts, n8n workflows that json.loads the result) should set true. | |
| sessionid | No | Session id whose validity should be checked. If omitted, the auth_sessionid (the calling session) is checked instead. | |
| auth_sessionid | Yes | Session id from a prior user.login call. The MCP wrapper passes it as the request's auth field; the call validates exactly this session id. |