Skip to main content
Glama

shell_session_open

Open a persistent shell session with secrets injected at creation; idle sessions auto-terminate. Use for running commands where plaintext secrets must not reach the model.

Instructions

Open a persistent shell session (PTY when node-pty is available, plain child_process otherwise — the response's pty field says which). Secrets are injected once at creation per matching rule; idle sessions are killed after ttlSeconds (rule ttlSeconds overrides defaults.sessionTtlSeconds).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoworking directory (~ is expanded); default: server cwd
profileNooptional profile name for rule matching
ttlSecondsNoidle TTL override (seconds)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses the PTY-vs-child_process fallback plus the `pty` response field, that secrets are injected once at creation per matching rule, and idle-TTL termination semantics. Missing only auth/permission requirements and failure behavior.

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?

Two dense sentences with the core action front-loaded; the PTY parenthetical and the TTL precedence note carry real information. Slightly heavy on embedded parentheticals but no wasted prose.

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?

For a session-opening tool with no annotations and no output schema, the description covers lifecycle, secret injection, and TTY behavior well, but omits how the session is subsequently driven (shell_session_send) and any authorization constraints, leaving the agent to infer the interaction model.

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?

Schema coverage is 100%, so the baseline is 3. The description goes beyond it by explaining ttlSeconds precedence (rule ttlSeconds overrides defaults.sessionTtlSeconds), which adds meaning not present in the schema field text.

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?

States a specific verb and resource: 'Open a persistent shell session.' The word 'persistent' implicitly distinguishes it from the one-shot sibling shell_exec, but it never names or contrasts with any sibling explicitly.

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?

No when-to-use guidance is given. With shell_exec, shell_session_send, and shell_session_close in the sibling set, the agent must infer from the tool name alone that this is the session-establishment step rather than one-shot execution. No exclusions, prerequisites, or alternatives are stated.

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