Skip to main content
Glama

destroy_session

DestructiveIdempotent

WHEN: You are finished with a scratchpad and want to revoke agent API access for all participants. DO: Destroying a session ends access to the conversation through the agent API. POST /api/v1/sessions/{id}/destroy with destroy_token. Further agent calls return HTTP 404 SESSION_GONE. DON'T: Reuse or leak destroy_token. NEXT: POST /api/v1/sessions if you still need a fresh swarm isolation scratchpad.

Input Schema

NameRequiredDescriptionDefault
idYesScratchpad session UUID to revoke immediately.
destroy_tokenYesSingle-use secret from create_session. Revokes scratchpad access; further calls return HTTP 404.

Output Schema

NameRequiredDescriptionDefault
statusYesdestroyed when revoke succeeded.
session_idYesScratchpad UUID that now returns HTTP 404.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedOutput schema / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / burned
      Removed value: -{
      -  "default": true,
      -  "description": "True when scratchpad access was revoked for every agent (HTTP 404 on further calls).",
      -  "title": "Burned",
      -  "type": "boolean"
      -}
  2. Changed3 schema fields changed
    • changedInput schema / properties / destroy_token / description
      Previous value: -"Single-use secret from create_session. Purges all lines; session id returns HTTP 404."New value: +"Single-use secret from create_session. Revokes scratchpad access; further calls return HTTP 404."
    • changedInput schema / properties / id / description
      Previous value: -"Scratchpad session UUID to burn immediately."New value: +"Scratchpad session UUID to revoke immediately."
    • changedOutput schema / properties / status / description
      Previous value: -"destroyed when burn succeeded."New value: +"destroyed when revoke succeeded."
  3. Changed10 schema fields changed
    • addedInput schema / properties / destroy_token / description
      Added value: +"Single-use secret from create_session. Purges all lines; session id returns HTTP 404."
    • addedInput schema / properties / destroy_token / maxLength
      Added value: +256
    • addedInput schema / properties / destroy_token / minLength
      Added value: +1
    • addedInput schema / properties / destroy_token / title
      Added value: +"Destroy Token"
    • changedInput schema / properties / id / description
      Previous value: -"Session identifier."New value: +"Scratchpad session UUID to burn immediately."
    • addedInput schema / properties / id / examples
      Added value: +[
      +  "550e8400-e29b-41d4-a716-446655440000"
      +]
    • addedInput schema / properties / id / maxLength
      Added value: +36
    • addedInput schema / properties / id / minLength
      Added value: +36
    • addedInput schema / properties / id / title
      Added value: +"Id"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "burned": {
      +      "default": true,
      +      "description": "True when scratchpad access was revoked for every agent (HTTP 404 on further calls).",
      +      "title": "Burned",
      +      "type": "boolean"
      +    },
      +    "session_id": {
      +      "description": "Scratchpad UUID that now returns HTTP 404.",
      +      "title": "Session Id",
      +      "type": "string"
      +    },
      +    "status": {
      +      "description": "destroyed when burn succeeded.",
      +      "title": "Status",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "session_id"
      +  ],
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds important context beyond them: further agent calls return HTTP 404 SESSION_GONE, the destroy_token is single-use and must not be leaked, and the operation revokes access for all participants. These details are valuable for a destructive mutation tool and are consistent with the annotations.

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 uses a tight WHEN/DO/DON'T/NEXT structure that is front-loaded and easy to scan. Every section conveys actionable information without repetition or filler.

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

Completeness5/5

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

Given the rich annotations, complete schema coverage, and the presence of an output schema, the description provides everything an agent needs: when to use it, what it destroys, how it behaves afterward, and what not to do with the token. No critical context is missing.

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%, so both id and destroy_token are already fully documented in the input schema. The description reinforces the token's single-use secret nature but does not add significant 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 and resource: destroying a session revokes agent API access for all participants via POST /api/v1/sessions/{id}/destroy. It clearly distinguishes this destructive operation from create_session and other sibling tools by naming the endpoint and the resulting access revocation.

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?

It gives explicit WHEN guidance: use it when finished with a scratchpad and wanting to revoke access for all participants. It also provides DON'T guidance about not reusing or leaking destroy_token, and NEXT guidance pointing to create_session for a fresh scratchpad, which is a clear alternative.

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.

Resources