Skip to main content
Glama

spawn_client_leave

End a Spawn session and despawn the body gracefully, journaling the departure before the socket closes. Call when done; the room folds when the last body leaves, and an idle session self-expires.

Instructions

End the session and despawn the body — the graceful departure (the despawn is journaled before the socket closes). The room folds when the last body leaves, so spawn_exec and spawn_logs stop working after this until something else is standing. Call it when you are done; a session left alone self-expires at its ttl anyway.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionNoSession name, so one machine can stand more than one body (default 'default'). Every verb takes it; a session self-expires at its ttl.
projectDirNoAbsolute path to the Spawn game project (.env). Defaults to SPAWN_PROJECT_DIR or the MCP process cwd.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.1/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 delivers: the despawn is journaled before the socket closes, the room folds when the last body leaves, spawn_exec and spawn_logs stop working after this, and sessions self-expire at ttl. It does not cover failure modes such as calling with no active session, but the key side effects and state transitions are disclosed.

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 action is front-loaded in the first clause, and each subsequent sentence adds a distinct consequence (journaling, room folding, dependent-tool breakage, self-expiry) rather than padding. Slightly dense with em-dash clauses, but no sentence is wasted.

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?

For a two-parameter, zero-required teardown tool with no annotations or output schema, the description covers purpose, side effects, and timing sufficiently. It omits return value and error behavior, but no output schema exists to require the former, so the gap is minor.

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 coverage is 100%, so both parameters (session, projectDir) are already fully documented in the schema. The description echoes the ttl self-expiry behavior but adds no syntax or format detail beyond what the schema provides, making the baseline 3 appropriate.

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?

The description states a specific verb+resource and scope: 'End the session and despawn the body.' It clearly distinguishes itself from siblings like spawn_client_join and spawn_client_status by describing a teardown operation.

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?

'Call it when you are done' gives clear invocation context, and 'a session left alone self-expires at its ttl anyway' tells the agent this is optional and offers an implicit alternative (do nothing). It stops short of naming a sibling alternative or explicit when-not conditions, but the context is well established.

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