-
Notifications
You must be signed in to change notification settings - Fork 0
save_pdf
Kelly Ferrone edited this page Sep 10, 2026
·
4 revisions
Print the current page to PDF and keep it with the session's files.
| MCP tool | save_pdf |
| HTTP | POST /browser/pdf |
This is the browser's own print output, so text stays selectable and the whole document is included rather than just the viewport. Returns the stored file; session_files gives it a link.
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
session_id |
string | yes over HTTP | — | The session_id returned by /browser/open. Required here. |
url |
string | no | — | |
filename |
string | no | — |
| Field | Type | Notes |
|---|---|---|
file |
object | The stored file, as the Grid's download store lists it. |
bytes |
integer | Size of the PDF in bytes. |
url |
string | Current URL after the action. |
title |
string | Page title after the action. |
Errors are 400 for a bad argument, 401 without a token, 500 when the Grid
refuses. Over MCP the same failures arrive as a tool error.
MCP
save_pdf()
HTTP
curl -X POST $SELENIUM_FLOW/browser/pdf \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"session_id": "…"
}'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
Lifecycle
Going places
Doing things
Getting things out