Skip to main content
Glama
matt-coppinger

Horizon MCP Server

search_ad_users_or_groups

Read-only

Searches Active Directory users and groups in Horizon to return matching accounts and IDs needed for pool entitlements. Supports filtering by name, login, group, or domain.

Instructions

Search for AD users and groups in the Horizon environment.

Use the returned 'id' field when setting pool entitlements.

Common filter fields: name, login_name, group, domain. Example filters: Find user by login: {"type":"Equals","name":"login_name","value":"jsmith"} Find by display name: {"type":"Contains","name":"name","value":"John"} Groups only: {"type":"Equals","name":"group","value":"true"}

Returns {items, count, page, size, pages_fetched, has_more, next_page, truncated}. If has_more is true there may be more results: call again with page=next_page (or narrow the filter), or pass fetch_all=true to fetch pages automatically (stops after 10 pages or 5000 items and sets truncated=true). Never treat a result with has_more=true as the complete list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (1-based)
sizeNoResults per page (max 1000)
filterNoHorizon filter JSON. Example to search by name: {"type":"Contains","name":"name","value":"john"} or by login: {"type":"Equals","name":"login_name","value":"jsmith"}
fetch_allNoFetch successive pages automatically (up to 10 pages / 5000 items). Prefer a filter when you only need a subset.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.2.0
    • addedInput schema / properties / fetch_all
      Added value: +{
      +  "default": false,
      +  "description": "Fetch successive pages automatically (up to 10 pages / 5000 items). Prefer a filter when you only need a subset.",
      +  "type": "boolean"
      +}
    • addedOutput schema / additionalProperties
      Added value: +true
    • removedOutput schema / properties
      Removed value: -{
      -  "result": {
      -    "items": {},
      -    "type": "array"
      -  }
      -}
    • removedOutput schema / required
      Removed value: -[
      -  "result"
      -]
    • removedOutput schema / x-fastmcp-wrap-result
      Removed value: -true
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description goes well beyond them by disclosing pagination semantics, the truncation flag, the 10-page/5000-item ceiling on fetch_all, and the rule never to treat has_more=true as a complete list. This is exactly the operational context an agent needs and cannot get from annotations.

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?

Front-loads purpose, then examples, then return-shape and pagination rules in a scannable block. It runs a bit long and partially repeats the schema's filter example, but no sentence is wasted.

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

Completeness5/5

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

An output schema exists, yet the description still summarizes the return envelope and the has_more/next_page contract that governs correct repeated invocation. Combined with the filter and fetch_all guidance, nothing needed to call this tool correctly is missing.

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 already 100%, so the baseline is 3, but the description adds real meaning: it enumerates common filter field names (name, login_name, group, domain) and links fetch_all's stop conditions to the truncated flag. The filter examples duplicate the schema's example somewhat, keeping this from a 5.

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 (Search) and resource (AD users and groups) scoped to the Horizon environment, and adds the downstream purpose (use the returned 'id' when setting pool entitlements). An agent can distinguish this from get_ad_user_or_group (single lookup) and list_ad_domains without opening another schema.

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?

Gives concrete filter recipes for the three main retrieval patterns (by login, by display name, groups only) plus explicit pagination guidance (call again with page=next_page, narrow the filter, or use fetch_all). It does not explicitly name the closest sibling (get_ad_user_or_group) or say when a single-record fetch is preferable, so it stops just short of a 5.

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