Skip to main content
Glama
initMAX

Zabbix MCP Server

userdirectory_test

Read-only

Validate LDAP or SAML directory settings before saving by testing connectivity and optional authentication with provided parameters, so misconfigured directories are caught early.

Instructions

Test an LDAP or SAML directory connection without saving it. Verifies that Zabbix can connect to the directory server with the provided parameters and optionally performs a test authentication. Use this before creating or updating a directory to validate settings. Authenticates with the configured server-level credentials (api_token or username/password) by default; set auth_sessionid to a session id from user.login if your Zabbix configuration restricts userdirectory.test to interactive sessions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYesTest LDAP/SAML directory connection parameters. Include connection details (host, port, base_dn, etc.) and optionally test credentials (test_username, test_password).
serverNoTarget Zabbix server. Available: default. Defaults to 'default' if omitted.
raw_jsonNoStrips 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.
auth_sessionidNoOptional session id from a prior user.login call. When set, the wrapper uses it for the JSON-RPC auth header instead of the configured server credentials.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.41.0

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint=true and openWorldHint=true, so safety is partly covered. The description adds real value beyond that: it says nothing is saved, that it optionally performs a test authentication, and explains the server-level auth default plus the interactive-session restriction requiring auth_sessionid.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each earning its place and front-loaded with the core action and the pre-validation purpose. The authentication sentence is dense but relevant, though it could be tightened.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return values need not be explained, and annotations cover the safety profile. The description covers purpose, timing, and auth prerequisites adequately; a brief note on what a failed test looks like would make it fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% (baseline 3), and the description adds meaning beyond the schema by explaining where auth_sessionid comes from (user.login) and the condition under which it is needed when userdirectory.test is restricted to interactive sessions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource and scope: 'Test an LDAP or SAML directory connection without saving it.' This clearly distinguishes it from the sibling userdirectory_get (read) since it is a validation operation that does not persist.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use this before creating or updating a directory to validate settings' gives explicit when-to-use context. It doesn't name a sibling alternative or state when-not-to-use, but the pre-validation guidance is concrete.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.