Skip to main content
Glama
matt-coppinger

Horizon MCP Server

list_sessions

Read-only

Retrieve active user sessions in a Horizon VDI environment with filters for user, desktop pool, machine, client, or state. Supports pagination to fetch all results.

Instructions

List active user sessions in the environment.

Common filter fields: user_name, desktop_pool_id, machine_name, client_name, state. Session states: CONNECTED, DISCONNECTED, PENDING.

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 string. Example: {"type":"Equals","name":"desktop_pool_id","value":"<id>"} or {"type":"Equals","name":"user_name","value":"jsmith"}
sort_byNoField to sort by, e.g. user_name, start_time
order_byNoSort direction: ASC or DESC
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.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds genuine behavioral context beyond that: return shape, pagination termination limits (10 pages / 5000 items), the truncated flag, and an explicit warning never to treat has_more=true as complete. It does not cover auth or rate-limit behavior, keeping it at 4.

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

Conciseness5/5

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

Front-loaded with the core purpose, then compactly organized into filter fields, states, and the return/pagination contract. Every sentence earns its place and there is no filler.

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?

For a paginated list tool with an output schema, the description supplies exactly what the schema cannot: how to interpret has_more/next_page/truncated and how to continue. Nothing an agent needs to call and iterate 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 100%, so the baseline is 3, but the description adds meaning the schema lacks: the session state enum values (CONNECTED, DISCONNECTED, PENDING) and the field names accepted by the opaque filter JSON (user_name, desktop_pool_id, machine_name, client_name, state). It does not document sort_by/order_by interactions.

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

Purpose4/5

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

States a specific verb and resource ('List active user sessions') plus scope ('in the environment'), which is clear and actionable. It does not explicitly differentiate from siblings like get_session or diagnose_session, so it falls short of the 5 bar for sibling distinction, but the purpose itself is unambiguous.

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?

Offers real usage context: common filter fields, valid session states, and explicit pagination guidance (call again with page=next_page, narrow the filter, or fetch_all=true). It never explicitly says when-not to use it vs alternatives such as get_session, so it is clear but not fully routing.

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