Skip to main content
Glama

switch_session

Set a specified session as the default active one, enabling AI assistants to control persistent shells, SSH, REPLs, and serial devices.

Instructions

Switch the default active session.

Args: session_id: Target session ID to make active.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden, but it only implies a state mutation. It omits whether the previous active session is preserved, what happens on an invalid ID, whether permissions are required, or if the change is reversible.

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?

The purpose is front-loaded in a single short sentence and the arg line is terse. The 'Args:' boilerplate is slightly formulaic but costs little.

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

Completeness2/5

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

For a state-changing tool with zero annotations and no usage context, the description is too thin. An output schema exists so return values need not be explained, but prerequisites, error behavior, and session-lifecycle relationships are missing.

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

Parameters3/5

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

Schema description coverage is 0% and the schema only titles the field 'Session Id,' so the description's 'Target session ID to make active' adds minor clarifying value. It still gives no format, sourcing, or validity constraints for the ID.

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 states a specific verb and resource: 'Switch the default active session.' An agent can tell this mutates session state. However, it never distinguishes itself from siblings like close_session or spawn, which also manipulate session lifecycle.

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?

There is no when-to-use guidance and no mention of alternatives. It does not say to first call list_sessions to obtain a valid session_id, nor how this differs from close_session or spawn.

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