session_delete
Delete a session for good.
Deletes the session now: what it saved (the browser and the files), its recording, its logs and its pages. A running session is stopped without saving first. This cannot be undone. The record of its usage and cost stays, for billing.
Inputs
| Name | Type | Default | Allowed values | Description |
|---|---|---|---|---|
sessionIdrequired | string | – | – | The session's id, from session_create. |
sessionId is the id that session_create returned. The server keeps no default session. This tool works on the session as it is, running or stopped, and does not resume it first.
Example call
This is what an MCP client sends. You do not write it yourself: ask the model in plain words and it calls the tool.
{ "name": "session_delete", "arguments": { "sessionId": "6c1f3c9e-1d2a-4f67-9b0e-1b2c3d4e5f60" }}What it returns
A confirmation line.
Session 6c1f3c9e-1d2a-4f67-9b0e-1b2c3d4e5f60 deleted.When a call fails, the result is marked as an error. Its text starts with the API’s error code, such as unauthorized or session_not_running, followed by its message.
Annotations
The server tells every client what this tool does to the world, so a client can decide what to ask you about before it runs.
| Annotation | Value |
|---|---|
title | Delete a session |
readOnlyHint | false |
destructiveHint | true |
openWorldHint | false |
Good to know
- Use session_stop instead to keep the session’s tabs and files.
- Read anything you want to keep from /workspace first.
The same thing with the API
| Endpoint | Reference |
|---|---|
DELETE /v1/sessions/{id} | Delete a session |
These docs describe a beta API. Endpoints, fields and SDK methods may change before general availability; breaking changes will be listed in the changelog.