Delete an agent's session
destroy_sessionDestroy 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 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. Requires the Admin role.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"session": "<session>"
},
"name": "destroy_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The agent's name, as list_services shows it: the agent whose session to delete. | |
| session | Yes | The session id, as list_sessions names it. | |
| org_name | No | The Valet organization the agent belongs to. Omit to use the organization the account joined first. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| org | Yes | Name of the Valet organization the call acted in. | |
| kind | Yes | Always session: the kind of thing this tool destroys. | |
| name | Yes | ID of the session destroyed, as passed in session. | |
| already_gone | No | True when the session was already gone before the call, so nothing was destroyed. Absent when this call destroyed it. |