Skip to content

save_flow

Kelly Ferrone edited this page Sep 12, 2026 · 2 revisions

save_flow

Create or replace a flow.

MCP tool save_flow
HTTP POST /flows/save

The same name updates, a new one creates. Always writes to this session's own library, never the shared one — so session is required in practice: the shared global library is read-only, because every session lists and runs what is in it. The document is validated against the live tools and a refusal lists every problem at once.

Parameters

Name Type Required Default Notes
session string no Whose library to write to. Needed unless the request names a session another way, with the X-Session-Key header: the shared 'global' library is read-only, so a write that resolves to it is refused rather than defaulted.
name string yes
description string no
parameters object no
steps array yes

Returns

Field Type Notes
saved boolean
session string
name string
steps array

Errors

Status Means
400 The request cannot succeed as sent — an unusable name, a flow that does not exist, a document that would not run, or a write aimed at the read-only shared library. Do not retry it unchanged.
401 Missing or wrong bearer token.
500 Something failed that this server did not expect.

Over MCP the same failures arrive as a tool error.

Example

MCP

save_flow(name="…", steps=[{"tool": "navigate", "params": {"url": "https://example.com"}}])

HTTP

curl -X POST $SELENIUM_FLOW/flows/save \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "session_id": "…",
    "name": "…",
    "steps": [
      {
        "tool": "navigate",
        "params": {
          "url": "https://example.com"
        }
      }
    ]
  }'

← All actions · Installing · Deployment

Clone this wiki locally