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. Changed3 schema fields changed
    • addedInput schema / properties / statement / properties / sessionId / anyOf
      Added value: +[
      +  {
      +    "pattern": "^ses_[0-9A-HJKMNP-TV-Z]{26}$",
      +    "type": "string"
      +  },
      +  {
      +    "pattern": "^att_[0-9A-HJKMNP-TV-Z]{26}$",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / statement / properties / sessionId / pattern
      Removed value: -"^ses_[0-9A-HJKMNP-TV-Z]{26}$"
    • removedInput schema / properties / statement / properties / sessionId / type
      Removed value: -"string"
  2. First observed

TDQS

A3.9/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. It discloses important side effects: the platform builds an evidence bundle, signs a record, and both owners can retrieve it. It also explains auth requirements for each mode. It does not cover irreversibility or error cases, but the main behavioral impact is transparent.

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?

The description is two sentences with no filler. It front-loads the purpose and outcome, then efficiently explains the mode-specific flow. Every sentence earns its place.

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?

This is a complex tool with nested objects, no output schema, and no annotations. The description explains the overall flow and modes but omits response format, error conditions, and relies on an external SPEC for constructing the CloseStatement. It is adequate but leaves notable gaps.

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 only 40%, so the description must compensate. It adds meaning for mode (prepare/submit), auth (signed GET vs POST), and statement (built per SPEC §7.4). However, it does not clarify sessionId or the signature object beyond what the schema already provides.

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?

The description clearly states the tool closes an active session and starts record issuance, with a specific verb and resource. It does not explicitly differentiate from sibling tools like close_attestation or pause_session, so it misses the top score.

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?

The description provides clear operational context by explaining the two modes: prepare returns the current head, and submit sends a signed CloseStatement. It does not explicitly state when to use this tool versus alternatives, but the mode-specific guidance is strong.

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.