files_list
List files in the workspace.
Lists a folder of the session's /workspace disk.
Inputs
| Name | Type | Default | Allowed values | Description |
|---|---|---|---|---|
sessionIdrequired | string | – | – | The session's id, from session_create. |
path | string | . | – | A folder inside the workspace, for example downloads. |
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": "files_list", "arguments": { "sessionId": "6c1f3c9e-1d2a-4f67-9b0e-1b2c3d4e5f60", "path": "downloads" }}What it returns
One line per entry: d for a folder or - for a file, the size in bytes, and the name.
- 48213 report.csvWhen 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 | List files |
readOnlyHint | true |
destructiveHint | false |
openWorldHint | false |
Good to know
- It works on a stopped session too: it reads the files the session saved when it stopped, without starting a machine. If the session saved nothing, the call fails with
nothing_saved.
The same thing with the API
| Endpoint | Reference |
|---|---|
GET /v1/sessions/{id}/files | Read a file or list a folder |
These docs describe a beta API. Endpoints, fields and SDK methods may change before general availability; breaking changes will be listed in the changelog.