Skip to main content
Glama

Close a DSH session

dsh_close_session
Destructive

Close one ACP session to cancel in-flight work, release run resources, and flush persistence while retaining resumable history. Requires confirm=true before closing.

Instructions

Close exactly one session via ACP session/close. This cancels in-flight work, drains updates, flushes persistence, and releases the session run scope. Persisted history is retained and can be resumed later. Requires confirm=true. Closing is NOT read-only and is NOT a safe way to inspect a session; it will cancel that session's in-flight work.

Input Schema

NameRequiredDescriptionDefault
confirmYesMust be true: closing cancels in-flight work and releases run resources (history is kept; it is not read-only).
session_idYesExplicit session id to close.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations by spelling out the exact sequence of effects (cancels in-flight work, drains updates, flushes persistence, releases the run scope) and, crucially, what is preserved (persisted history, resumable later). Annotations only flag destructive=true; the description tells the agent what is actually destroyed versus retained.

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 operation and target, followed by effects and then constraints; every sentence carries signal. There is mild redundancy — the not-read-only caveat appears in both the description and the confirm parameter, and the confirm requirement is restated.

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 mutation tool with annotations and no output schema, the description covers effects, side effects, and data retention adequately. It does not state behavior for an invalid or already-closed session id, which leaves an edge case unaddressed.

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?

With 100% schema description coverage, both parameters are already documented, including the confirm=true requirement and the meaning of session_id. The description adds only the 'exactly one session' scoping nuance, so the schema does the heavy lifting and the baseline of 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 ('Close exactly one session via ACP session/close') with an explicit scope of exactly one session, and contrasts it against a read-only inspection use case, so an agent can tell what it does without opening the schema.

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?

Gives clear conditions: requires confirm=true, must not be used to inspect a session, and notes history is retained and resumable later, which points toward dsh_resume_session. It stops short of explicitly distinguishing itself from the sibling dsh_cancel_session, which also affects in-flight work — that choice is left to inference.

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