Skip to main content
Glama

list_sessions

Retrieve active session details and metadata to monitor and manage mock server configurations for development and testing workflows.

Instructions

List all active sessions with metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler implementation for the list_sessions tool, which invokes sessionManager.listSessions().
    list_sessions: async () => {
      try {
        const sessions = sessionManager.listSessions();
        return { success: true, data: sessions };
      } catch (error: any) {
        return {
          success: false,
          error: `Failed to list sessions: ${error.message}`
        };
      }
    },
Behavior2/5

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

No annotations are provided, so the description carries the full disclosure burden. While 'List' implies read-only behavior, the description does not confirm this explicitly, nor does it explain what constitutes 'active' status, what metadata is returned (format/fields), or whether results are paginated—critical gaps for a 'list all' operation.

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?

The description is a single, efficient sentence with no waste. Every word earns its place: 'List' (action), 'all' (scope/filter), 'active' (state filter), 'sessions' (resource), 'with metadata' (return detail).

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

Completeness3/5

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

Given zero parameters and no output schema, the description is minimally viable—it conveys the basic operation. However, it lacks necessary context about what 'metadata' includes, what 'sessions' refer to in this domain (WebSocket/http?), and lacks behavioral warnings appropriate for a mutation-free listing tool.

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?

With zero parameters (empty schema), the baseline score is 4 per calibration guidelines. The word 'all' in the description correctly signals that no filtering parameters exist, which aligns with the empty input schema.

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?

The description uses specific verb 'List' and resource 'sessions', and qualifies scope with 'active' and 'with metadata'. However, it does not explicitly differentiate from sibling tool 'list_endpoints', leaving ambiguity about when to use which list operation.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'get_request_history' (which also retrieves session-related data) or prerequisites for invocation. No mention of 'all' implying potential performance impact on systems with many sessions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aj-bartocci/SpyNet'

If you have feedback or need assistance with the MCP directory API, please join our Discord server