Skip to main content
Glama

Close a witnessed session

close_session

Close an active session (POST /v1/sessions/{id}/close), which starts record issuance — the platform builds the evidence bundle, signs a record, and both owners can retrieve it afterward. mode: "prepare" (auth = a signed GET) returns the current head to close at. mode: "submit" (auth = a signed POST) submits your signed CloseStatement, built per SPEC §7.4.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
authYes
modeYes
sessionIdYes
signatureNoRequired for mode=submit.
statementNoRequired for mode=submit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

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 behavioral disclosure burden, and it does this well: it states that closing is not merely a state change but triggers evidence-bundle construction, record signing, and later retrieval by both owners. It also discloses that auth must be signed locally per request mode and that the server cannot compute signatures. It stops short of stating whether closing is irreversible or idempotent, which would be useful, but the major side effects are clearly surfaced.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences carry the full payload: purpose, endpoint, side effects, mode distinction, auth style, and spec reference. Every clause adds value, and the most important information is front-loaded.

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 nested, mode-dependent tool with no output schema and no annotations, the description covers the why and the side effects well, but it leaves gaps: what a successful submit returns, how to construct the CloseStatement beyond a spec reference, and whether the operation can be retried or reversed. The prepare-mode return is described, but the submit-mode response is not.

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 only 40%, so the description must compensate, and it partly does: it clarifies that mode=prepare returns the current head and mode=submit sends a signed CloseStatement, which adds meaning beyond the bare enum. However, it does not add useful semantics for sessionId or the separate signature object, and the relationship between auth, signature, and statement could be clearer.

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 opens with an explicit verb and resource—'Close an active session'—and names the exact endpoint (POST /v1/sessions/{id}/close), so an agent immediately knows what action this tool performs. It also states the consequence ('starts record issuance, the platform builds the evidence bundle, signs a record'), which makes the purpose concrete and distinguishes it from sibling tools like start_session or get_record.

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?

It gives clear context: use this for an active, witnessed session, and it explains when to use each mode—prepare returns the current head, submit sends the signed CloseStatement. It does not explicitly name alternatives or state when-not-to-use conditions, but the mode-level guidance and the requirement that the session be active are strong enough to guide selection.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.