Skip to main content
Glama

List Sessions

list_sessions
Read-onlyIdempotent

Lists active Maya sessions with session key, host, port, PID, user, version, and scene details so agents can discover connected instances to target.

Instructions

List all active Maya sessions.

Boundary: Disambiguated from add_session (register a host:port by hand) and maya_setup_guide (diagnose an empty result) — list_sessions only reports what is already connected.

Returns a list of session information including:

  • session_key: Session key used to interact with tools and resources

  • host: Session host address

  • port: Session port number

  • pid: Maya process ID

  • user: Logged-in user

  • maya_version: Maya version string

  • scene_name: Current scene filename

  • scene_path: Full path to current scene

Note: To detect new or removed sessions, clients should call this tool periodically (e.g., every 10-30 seconds) and compare results. The SessionManager automatically scans for new Maya sessions in the background.

If this returns an empty list, call maya_setup_guide() for connection help.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_sessions"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, closed-world), yet the description adds non-obvious behavior: that a background SessionManager scans for new sessions, that this tool only reports current state, and that change detection requires client-side polling and diffing. That is real context an agent cannot get from the annotation block.

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?

Purpose and boundary are front-loaded in two short paragraphs, which is the right ordering. The eight-line field enumeration duplicates the existing output schema and is the one part that does not fully earn its space.

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 zero-argument listing tool with full annotations and an output schema, nothing an agent needs is missing: what it returns, how to detect changes, and what to do on empty results are all covered.

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?

Zero parameters, so there is nothing to disambiguate; the baseline for no params is 4. The description instead enumerates return fields, which is useful but belongs to output contract rather than parameter semantics.

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?

The first sentence gives a specific verb and resource plus a scope qualifier ('active'), and the Boundary paragraph explicitly names the two siblings it is not (add_session, maya_setup_guide) and why. An agent can route correctly without opening any schema.

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

Usage Guidelines5/5

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

It states when to use this versus alternatives, gives an operational cadence for detecting changes ('every 10-30 seconds'), and an explicit fallback ('If this returns an empty list, call maya_setup_guide()'). When-not conditions and the alternative are both spelled out.

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