Skip to main content
Glama
FutureAtoms

Agentic Control Framework (ACF)

by FutureAtoms

list_sessions

Retrieve all active sessions in the orchestration layer to track ongoing tasks and manage workflow states.

Instructions

List sessions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
random_stringYes

Implementation Reference

  • The main handler function for the list_sessions tool. Iterates over the in-memory sessions map and returns an array of session objects with sessionId, pid, command, shell, status, startTime, and duration.
    function listSessions() {
      try {
        const activeSessions = [];
    
        for (const [id, session] of sessions) {
          activeSessions.push({
            sessionId: id,
            pid: session.pid,
            command: session.command,
            shell: session.shell,
            status: session.status,
            startTime: new Date(session.startTime).toISOString(),
            duration: session.endTime ? session.endTime - session.startTime : Date.now() - session.startTime
          });
        }
    
        return {
          success: true,
          sessions: activeSessions,
          count: activeSessions.length
        };
    
      } catch (error) {
        logger.error(`Error listing sessions: ${error.message}`);
        return {
          success: false,
          message: error.message
        };
      }
    }
  • Input schema definition for the list_sessions tool. Declares name, description, and an inputSchema requiring a random_string parameter.
    { name:'list_sessions', description:'List sessions', inputSchema:{ type:'object', properties:{ random_string:{type:'string'} }, required:['random_string'] } },
  • Dispatch/call site where the list_sessions tool name is matched and the terminalTools.listSessions() function is invoked.
    case 'list_sessions': data = terminalTools.listSessions(); break;
  • Module exports - listSessions is exported as part of the terminalTools module, making it available to server.js.
    module.exports = {
      getConfig,
      setConfigValue,
      executeCommand,
      readOutput,
      forceTerminate,
      listSessions,
      listProcesses,
      killProcess
    };
  • Test helper that generates example arguments for the list_sessions tool.
    case 'list_sessions': return { random_string:'x' };
Behavior1/5

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

With no annotations, the description must convey behavioral traits, but it only restates the name. No information about side effects, permissions, or response behavior is disclosed.

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

Conciseness2/5

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

While very short, the description is under-specified to the point of being useless, which is not effective conciseness. It fails to earn its place by adding value.

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

Completeness1/5

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

Given no output schema and a single undocumented parameter, the description provides almost no actionable information. It is grossly incomplete for an agent to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has one parameter 'random_string' with no description, and the tool description adds no meaning to it. The parameter's purpose is completely opaque.

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

Purpose1/5

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

The description 'List sessions' is a tautology of the tool name and does not specify what type of sessions (e.g., user, browser, or database sessions). It fails to differentiate from any of the numerous sibling tools.

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

Usage Guidelines1/5

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

No guidance is provided on when or why to use this tool, nor are any alternatives mentioned given the many sibling tools.

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/FutureAtoms/agentic-control-framework'

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