Skip to main content
Glama
capsulerun

Capsule Bash Server

Official

sessions

List all active session IDs and their current state to monitor running processes in the sandboxed Bash environment.

Instructions

List all active session IDs and their current state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'sessions' tool. Lists all active session IDs by returning the keys of the sessions map as JSON.
    server.registerTool(
      'sessions',
      {
        description: 'List all active session IDs and their current state.',
      },
      async () => {
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({ sessions: Array.from(sessions.keys()) }),
            },
          ],
        };
      },
    );
  • Registration of the 'sessions' tool on the MCP server via server.registerTool().
    server.registerTool(
      'sessions',
      {
        description: 'List all active session IDs and their current state.',
      },
      async () => {
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({ sessions: Array.from(sessions.keys()) }),
            },
          ],
        };
      },
    );
  • Schema/description for the 'sessions' tool. No inputSchema defined since it takes no arguments.
    {
      description: 'List all active session IDs and their current state.',
    },
  • Global sessions map (Map<string, Bash>) that stores all active Bash sessions, used by the 'sessions' tool to list session IDs.
    const sessions = new Map<string, Bash>();
Behavior3/5

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

Lacking annotations, the description states the tool lists active sessions, conveying a non-destructive, read-only behavior. But it omits details like whether state includes sub-attributes or if sessions are global.

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?

A single, front-loaded sentence with no wasted words. Efficiently captures the core functionality.

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 no output schema, the description could be more complete by hinting at return structure or example use. It covers the basic purpose but lacks actionable output details.

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?

No parameters; schema coverage is 100% by default. The description does not need to add param info. Baseline 4 for 0 parameters.

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?

Describes a specific action (list) and resource (active session IDs and state). Clearly distinguishes from siblings 'reset' and 'run' which imply modification actions.

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?

The description implies a read-only listing use case, and with siblings being action-oriented, the context is clear. However, no explicit when-not or alternative guidance is provided.

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/capsulerun/bash'

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