Skip to main content
Glama

Delete an agent's session

destroy_session
DestructiveIdempotent

Destroy one of an agent's conversation sessions: it leaves list_sessions and cannot be resumed, though its transcript is kept. This cannot be undone, so confirm with the user first, naming the session. A session that is running is refused; wait for it to finish. A session already deleted, or one of another agent, reports that it is gone and succeeds. Destroying the agent keeps its sessions, and once the agent is gone no MCP tool can remove them, so destroy them first if they should go. Requires connecting a Valet account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesRequired. The agent's name.
sessionYesRequired. The session id, as list_sessions names it.
org_nameNoThe Valet organization the agent belongs to. Omit to use the organization the account joined first.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructive=true and idempotent=true, yet the description still adds real substance: the transcript is retained, the session cannot be resumed, running sessions are rejected, and re-deleting an already-gone or foreign session reports gone-and-succeeds. It also discloses the Valet account auth requirement, which no annotation covers.

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?

Five tight sentences, front-loaded with the destructive action and immediate consequences before the edge cases and the agent-interaction caveat. Every sentence carries information, though the agent-destruction ordering note is a slight expansion beyond the tool's core job.

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?

With no output schema, the description compensates by spelling out success/failure semantics (refused when running, reported-gone-but-successful when already deleted or foreign-owned) plus the auth requirement. An agent has everything it needs to call this safely.

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 all three parameters (name, session, org_name) are already documented, including the org_name default behavior. The description adds only the 'naming the session' safety intent, which is a minor gloss over what the schema already states; baseline 3 is 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 opens with a specific verb+resource ('Destroy one of an agent's conversation sessions') and immediately narrows scope with what removal means (leaves list_sessions, cannot be resumed). It is clearly separable from siblings like get_session, list_sessions, and the other destroy_* tools for memory/resource/service.

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 preconditions (confirm with the user first, naming the session), a when-not condition (a running session is refused; wait for it to finish), and an ordering rule relative to destroying the agent (destroy sessions first). This is unusually complete routing and sequencing guidance.

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