Skip to main content
Glama

Start Session

exec_start
Destructive

Starts a process as a persistent session and returns a session ID immediately, so you can manage long-running commands that stream output or read stdin.

Instructions

Start a process as a session; returns session_id at once. Use when it outlives the call, streams output or reads stdin (exec_write). Then exec_poll, exec_wait, exec_kill, exec_close. Sessions persist across requests; finished ones are reaped after the session TTL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoChild working directory; omit to inherit.
argvYesProgram and arguments, e.g. ["python3", "-i"]. Passed verbatim.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
pidNo
errorNo
session_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations declare readOnly=false, destructive=true, openWorld=true, idempotent=false, and the description adds behavior those annotations don't carry: asynchronous return of session_id, persistence across requests, and TTL-based reaping of finished sessions. It doesn't explain the destructive implications of spawning a process or any resource limits, which keeps it short of a 5.

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?

Front-loaded with the core action and return value, then conditions, then lifecycle siblings, then persistence semantics. It is dense and telegraphic but essentially waste-free; the sibling enumeration sentence is the only part that reads as a list rather than prose.

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

Completeness4/5

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

An output schema exists, so return shape needn't be restated, and the description still covers the async contract, session lifetime, and next-step tools. The one gap is the meaning of the destructive annotation for a process-spawning tool, but otherwise an agent has what it needs.

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 100% with only two params, so the schema already documents 'cwd' (inheritance behavior) and 'argv' (verbatim passthrough with example). The description adds only indirect context via the stdin reference, so the baseline 3 applies.

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?

States a specific verb and resource ('Start a process as a session') plus the immediate return ('returns session_id at once'). Together with the usage condition ('when it outlives the call'), an agent can distinguish this from the synchronous sibling 'exec' and from 'exec_shell' without opening any schema.

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

Usage Guidelines5/5

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

Explicit selection criteria: use when the process outlives the call, streams output, or reads stdin, with the stdin counterpart named (exec_write). It also routes the follow-up lifecycle through exec_poll, exec_wait, exec_kill, exec_close, so the agent knows both when to enter and how to proceed.

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