-
Notifications
You must be signed in to change notification settings - Fork 0
keep_file
Kelly Ferrone edited this page Sep 12, 2026
·
1 revision
Keep one download beyond its browser.
| MCP tool | keep_file |
| HTTP | POST /files/keep |
Copies the file out of the Grid's store onto the server, where it survives the browser. Keeping a name that is already kept replaces it. The original download stays: the Grid offers no way to remove one file.
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
session |
string | no | — | Whose kept files. Defaults to the caller's session name if the request carries one, else the shared 'global' session. |
session_id |
string | yes over HTTP | — | The browser holding the file to copy. |
name |
string | yes | — |
| Field | Type | Notes |
|---|---|---|
kept |
boolean | |
session |
string | |
name |
string | |
size |
integer | |
creationTime |
integer |
| Status | Means |
|---|---|
400 |
The request cannot succeed as sent — an unusable name, or a server with no FLOW_DATA_DIR to keep files in. Do not retry it unchanged. |
401 |
Missing or wrong bearer token. |
404 |
No such browser session, or no such file in it. It ended, the Grid reaped it, or the id was never real. |
500 |
Something failed that this server did not expect. |
503 |
The Grid could not serve this — unreachable, or failing. Worth retrying after a wait. |
Over MCP the same failures arrive as a tool error.
MCP
keep_file(name="…")
HTTP
curl -X POST $SELENIUM_FLOW/files/keep \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"session_id": "…",
"name": "…"
}'The action pages are generated from openapi.yaml, which is itself generated from the live MCP tool schemas — so they describe the server that shipped, not the one someone remembered. Prose belongs in wiki-notes/<tool>.md in the repo.
selenium-flow · MIT
Start here
Guides
Lifecycle
Going places
Doing things
Getting things out