> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hotkey.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Tools reference

> Every MCP tool a Hotkey browser offers, with its inputs and what it returns.

The tools have the same names and inputs as Claude in Chrome's, so an agent that already drives Chrome through Claude in Chrome drives a Hotkey browser with no new instructions. The descriptions are Hotkey's own. Hotkey adds the tools Claude in Chrome has no use for on your own laptop: asking the person (`request_human`), signing in with a saved password (`sign_in`), answering page dialogs and handling downloads.

Tab ids are numbers. Every tab id names one browser, so a call with a `tabId` goes to that tab's browser whichever is selected. Calls without one go to the browser `select_browser` chose for this MCP session.

Every tool that takes a `tabId` also takes `page`: the site that tab is on, such as `example.com`. It is there for the person approving the call, who sees each input as a row and learns nothing from a tab number. A `page` the tab isn't on stops the call before it does anything (`page_mismatch`), and the error names the right site.

There are 30 tools.

## Browsers

A person can have several browsers, one per account or client.

### list\_connected\_browsers

List the browsers you can use: one per profile, company or client, each logged in to its own accounts. deviceId names one for select\_browser; inUse marks the one your calls without a tabId go to. timeZone is the time zone its pages see (the person's own, when they set one), so read and enter times in it. languages are the person's languages, most wanted first, when they set them. awake: it is running now (an asleep one wakes on your first call, in about a second). agent: what an agent is doing in it. waiting: an ask in it waits on the person.

No inputs.

**Returns:** JSON with one entry per browser: `deviceId` (`brw_…`), its name, `inUse`, `awake`, `timeZone`, `languages`, what an agent is doing in it and whether an ask waits.

### select\_browser

Use this browser (a deviceId from list\_connected\_browsers) for the calls without a tabId: tabs\_context\_mcp, tabs\_create\_mcp, navigate without a tabId. Calls with a tabId always go to that tab's browser. If the selected browser is deleted, those calls fail until you select another.

| Input | Type | Required | Description |
| - | - | - | - |
| `deviceId` | string | yes | The browser's `deviceId` (`brw_…`) from `list_connected_browsers`. |

**Returns:** A line naming the browser now selected for this MCP session.

### create\_browser

Make a new browser: a separate profile with its own sign-ins, cookies and tabs. Use it when a new client, company or person should have their sign-ins kept apart from the browsers you have; to work in one that exists, use list\_connected\_browsers and select\_browser instead. name is what the person sees in the console; it must differ from the workspace's other browsers' names. With select (true unless you pass false), your calls without a tabId go to the new browser. It goes out from Hotkey's server. Agents make at most 3 a day per workspace, within the plan's browsers. Deleting a browser and giving it a residential address are the person's choices, made in the console.

| Input | Type | Required | Description |
| - | - | - | - |
| `name` | string | yes | The browser's name, such as the client's or company's (at most 60 characters). |
| `select` | boolean | | Use the new browser for your calls without a tabId (default true). |

**Returns:** JSON with the new browser's `deviceId` (`brw_…`), `name`, `console` (its page in the console) and `selected`, then a line on what to call next. Refused past the plan's browsers, past 3 a day per workspace, for a key made for one browser and for an account on the waiting list.

## Tabs

### tabs\_context\_mcp

*List tabs*

List the browser's open tabs with their ids, titles and URLs. Call it before the other browser tools to get tab ids. otherAgent marks a tab another agent is working in now: leave it to them and use tabs\_create\_mcp for your own. watched marks the tab the person has on screen.

| Input | Type | Required | Description |
| - | - | - | - |
| `createIfEmpty` | boolean | | Open a blank tab when none is open. |

**Returns:** JSON `availableTabs`: each tab's `tabId` (a number), title and URL, with `asleep`, `crashed`, `otherAgent` and `watched` where they apply.

Marked read-only for clients that ask before acting.

### tabs\_create\_mcp

*Open a new tab*

Open a new blank tab and return its id. Close tabs you opened with tabs\_close\_mcp when you are done with them, unless the person wants them kept.

No inputs.

**Returns:** A line with the new tab's id.

### tabs\_close\_mcp

*Close a tab*

Close a tab by its id.

| Input | Type | Required | Description |
| - | - | - | - |
| `tabId` | number | yes | Tab to close, from tabs\_context\_mcp. |
| `page` | string | | The site this tab is on now, as tabs\_context\_mcp shows it (example.com). Send it with every call that names a tab: the person approving the call reads it, where the tab number tells them nothing. If the tab is on another site, nothing is done and the error names the right one. |

**Returns:** A line saying the tab closed.

Marked can change or lose things for clients that ask before acting.

### navigate

*Go to a page*

Load a URL in a tab and wait for it, or go "back" or "forward" in its history. The URL may leave out https\://. Only web pages load: http and https addresses, about:blank and data: URLs, never file: or chrome: ones. Without a tabId, the tab your last call used; on your first call, the tab the person is on, or a new tab when every open tab is another agent's.

| Input | Type | Required | Description |
| - | - | - | - |
| `url` | string | yes | The URL, or "back" or "forward". |
| `tabId` | number | | Tab to load it in, from tabs\_context\_mcp. |
| `page` | string | | The site this tab is on now, as tabs\_context\_mcp shows it (example.com). Send it with every call that names a tab: the person approving the call reads it, where the tab number tells them nothing. If the tab is on another site, nothing is done and the error names the right one. |

**Returns:** A line with the address the tab landed on. A note follows when the site answered with an error page or a bot check shows instead of the page. When the address is a file, the result says it is downloading and the tab stays where it was.

### resize\_window

*Resize the window*

Set the size of the tab's window in pixels.

| Input | Type | Required | Description |
| - | - | - | - |
| `width` | number | yes | Width in CSS pixels. |
| `height` | number | yes | Height in CSS pixels. |
| `tabId` | number | yes | Tab to resize, from tabs\_context\_mcp. |
| `page` | string | | The site this tab is on now, as tabs\_context\_mcp shows it (example.com). Send it with every call that names a tab: the person approving the call reads it, where the tab number tells them nothing. If the tab is on another site, nothing is done and the error names the right one. |

**Returns:** The window's new size.

## Reading the page

### read\_page

*Read the page*

Read the page as an accessibility tree, iframes included under their iframe line. Each element has a ref (like ref\_12) for computer, form\_input, scroll\_to and file\_upload. filter "interactive" keeps the buttons, links and fields on screen now, and says how many more are above or below the view; "all" (the default) keeps everything. Use depth or ref\_id to read part of a large page. The output stops at max\_chars (default 50000).

| Input | Type | Required | Description |
| - | - | - | - |
| `filter` | `interactive`, `all` | | `interactive` for the buttons, links and fields on screen now; `all` (the default) for everything. |
| `depth` | number | | How deep to read (default 15). |
| `ref_id` | string | | Read only this element and what is inside it. |
| `max_chars` | number | | Stop the output at this many characters (default 50,000). |
| `tabId` | number | yes | Tab to read, from tabs\_context\_mcp. |
| `page` | string | | The site this tab is on now, as tabs\_context\_mcp shows it (example.com). Send it with every call that names a tab: the person approving the call reads it, where the tab number tells them nothing. If the tab is on another site, nothing is done and the error names the right one. |

**Returns:** The accessibility tree as text, one element a line with its role, name and `ref`. With `interactive`, a last line counts the buttons, links and fields off screen.

Marked read-only for clients that ask before acting.

### find

*Find on the page*

Find elements by what they are or say ("search box", "add to cart button", "price of the blue mug"). Returns up to 20 matches with refs.

| Input | Type | Required | Description |
| - | - | - | - |
| `query` | string | yes | What to look for, in words. |
| `tabId` | number | yes | Tab to search, from tabs\_context\_mcp. |
| `page` | string | | The site this tab is on now, as tabs\_context\_mcp shows it (example.com). Send it with every call that names a tab: the person approving the call reads it, where the tab number tells them nothing. If the tab is on another site, nothing is done and the error names the right one. |

**Returns:** Up to 20 matching elements, each with its `ref`, role and name.

Marked read-only for clients that ask before acting.

### get\_page\_text

*Read the page's text*

The page's text, main article first, without markup, then the values in its form fields and the text of its iframes. For reading articles and long pages, and what a form or a cart holds. A long page comes in parts of 25000 characters: the result says the offset of the next. On a tab that shows a PDF: the document's title and text, each page marked \[Page N].

| Input | Type | Required | Description |
| - | - | - | - |
| `tabId` | number | yes | Tab to read, from tabs\_context\_mcp. |
| `page` | string | | The site this tab is on now, as tabs\_context\_mcp shows it (example.com). Send it with every call that names a tab: the person approving the call reads it, where the tab number tells them nothing. If the tab is on another site, nothing is done and the error names the right one. |
| `offset` | number | | Start at this character of the page's text (default 0), to read a long page part by part. |
| `max_chars` | number | | At most this many characters (default 25000). |
| `pages` | string | | PDF only: the pages to read, like "3", "3-7" or "8-" (default all, up to the length limit). |
| `refetch` | boolean | | PDF only: when Chrome no longer has the file, download it again from the site with one GET and the tab's cookies. Never for a PDF that answered a form or came from a one-time link. |

**Returns:** The page's title, URL and text, then `Field values:` (each filled form field and its value, never a password) and each iframe's text under an `[iframe <site>]` line. On a PDF tab, the document's text with `[Page N]` marks.

Marked read-only for clients that ask before acting.

### read\_console\_messages

*Read console messages*

The tab's console messages (logs, warnings, errors, exceptions) for its current site, kept from the first call on. Pass a pattern to keep the output small.

| Input | Type | Required | Description |
| - | - | - | - |
| `onlyErrors` | boolean | | Keep only errors and exceptions. |
| `pattern` | string | | A regular expression the message must match. |
| `clear` | boolean | | Forget the messages after reading them. |
| `limit` | number | | At most this many (default 100). |
| `tabId` | number | yes | Tab to read, from tabs\_context\_mcp. |
| `page` | string | | The site this tab is on now, as tabs\_context\_mcp shows it (example.com). Send it with every call that names a tab: the person approving the call reads it, where the tab number tells them nothing. If the tab is on another site, nothing is done and the error names the right one. |

**Returns:** The messages kept for the tab, oldest first, with their level.

Marked read-only for clients that ask before acting.

### read\_network\_requests

*Read network requests*

The tab's network requests (documents, fetches, images...) for its current site, kept from the first call on, with method and status.

| Input | Type | Required | Description |
| - | - | - | - |
| `urlPattern` | string | | Keep requests whose URL contains this. |
| `clear` | boolean | | Forget the requests after reading them. |
| `limit` | number | | At most this many (default 100). |
| `tabId` | number | yes | Tab to read, from tabs\_context\_mcp. |
| `page` | string | | The site this tab is on now, as tabs\_context\_mcp shows it (example.com). Send it with every call that names a tab: the person approving the call reads it, where the tab number tells them nothing. If the tab is on another site, nothing is done and the error names the right one. |

**Returns:** The requests kept for the tab: method, URL, status and type.

Marked read-only for clients that ask before acting.

## Acting on the page

### computer

*Click, type or take a screenshot*

Use the mouse and keyboard in a tab, and take screenshots. Coordinates are pixels in the last screenshot. Click buttons and links at their center, from a screenshot or by ref. A click or key that loads a new page returns once that page has loaded, and says where the tab went. A click by ref on an element that a dialog, cookie wall or bar covers clicks nothing and says what covers it, with its buttons.

| Input | Type | Required | Description |
| - | - | - | - |
| `action` | `left_click`, `right_click`, `type`, `screenshot`, `wait`, `scroll`, `key`, `left_click_drag`, `double_click`, `triple_click`, `zoom`, `scroll_to`, `hover` | yes | left\_click, right\_click, double\_click, triple\_click: click at coordinate or on ref. type: type text where the focus is. key: press keys (text). scroll: wheel at coordinate. scroll\_to: bring ref into view. hover: move the pointer to coordinate or ref. left\_click\_drag: from start\_coordinate to coordinate. screenshot: capture the tab. zoom: capture region bigger. wait: pause for duration seconds while the page runs, and say if it loaded a new page meanwhile. |
| `coordinate` | array of number | | (x, y) in pixels of the last screenshot. |
| `ref` | string | | An element ref from read\_page or find, instead of coordinate. |
| `text` | string | | For type: the text. For key: keys separated by spaces ("Tab Tab Enter"), or chords ("ctrl+a", "cmd+shift+t"). For select all, copy, cut, paste and undo, cmd and ctrl both work. |
| `duration` | number | | For wait: seconds, up to 10. (min 0, max 10) |
| `scroll_direction` | `up`, `down`, `left`, `right` | | For `scroll`: which way to scroll. |
| `scroll_amount` | number | | Wheel ticks for scroll (default 3). (min 1, max 10) |
| `start_coordinate` | array of number | | For left\_click\_drag: where the drag starts. |
| `region` | array of number | | For zoom: (x0, y0, x1, y1) in the last screenshot. |
| `scale` | number | | For screenshot and zoom: a smaller image (0.5 is half the width). Coordinates stay in the full-size frame. (min 0.1, max 1) |
| `repeat` | number | | For key: how many times to press the sequence. (min 1, max 100) |
| `modifiers` | string | | For clicks: modifier keys, like "shift" or "ctrl+shift". |
| `action_summary` | string | | A few words on what this step does on the page, for the person watching the activity log (for example "Opens the Filters menu"). No secrets. |
| `tabId` | number | yes | Tab to act in, from tabs\_context\_mcp. |
| `page` | string | | The site this tab is on now, as tabs\_context\_mcp shows it (example.com). Send it with every call that names a tab: the person approving the call reads it, where the tab number tells them nothing. If the tab is on another site, nothing is done and the error names the right one. |

**Returns:** For `screenshot` and `zoom`, an image. For the other actions, a line saying what happened: the element a click hit, the new page a click or key loaded (with its HTTP status when it is an error), and any dialog the action opened.

Marked can change or lose things for clients that ask before acting.

### form\_input

*Fill in a field*

Set a form field by ref: the option of a dropdown (by its text or value), a checkbox (true or false), a radio button, a number, a date, or a text field (its text is replaced).

| Input | Type | Required | Description |
| - | - | - | - |
| `ref` | string | yes | The field's ref, from `read_page` or `find`. |
| `value` | any | yes | The value: text, a number, true or false, or an option's text or value. |
| `action_summary` | string | | A few words on what this step does on the page, for the person watching the activity log (for example "Opens the Filters menu"). No secrets. |
| `tabId` | number | yes | Tab to set it in, from tabs\_context\_mcp. |
| `page` | string | | The site this tab is on now, as tabs\_context\_mcp shows it (example.com). Send it with every call that names a tab: the person approving the call reads it, where the tab number tells them nothing. If the tab is on another site, nothing is done and the error names the right one. |

**Returns:** A line with the field and the value it now holds.

Marked can change or lose things for clients that ask before acting.

### file\_upload

*Upload files*

Put files into a file input by ref, without opening a file picker (never click file inputs). This browser runs on another machine, so pass the files' contents in files: a text file's text in text, any file's bytes in data (base64), up to 10 MB in all. A file this browser downloaded goes in by its name in downloads instead, without its contents passing through you. A file only the person has (a photo of their ID, a document on their phone): ask them with request\_human to choose it on the page; Choose file in their live view opens their own device's picker.

| Input | Type | Required | Description |
| - | - | - | - |
| `files` | array of object | | The files to put in the input, each `{ data, name, mimeType }` with `data` in base64. |
| `paths` | array of string | | Not supported here: this browser can't read your files. Use files. |
| `downloads` | array of string | | Ids or names of finished files in this browser's downloads (from list\_downloads), to put in the input as they are. |
| `ref` | string | yes | The file input's ref. |
| `tabId` | number | yes | Tab to upload in, from tabs\_context\_mcp. |
| `page` | string | | The site this tab is on now, as tabs\_context\_mcp shows it (example.com). Send it with every call that names a tab: the person approving the call reads it, where the tab number tells them nothing. If the tab is on another site, nothing is done and the error names the right one. |

**Returns:** A line naming the files now in the input.

### javascript\_tool

*Run JavaScript on the page*

Run JavaScript in the page and get the value of its last expression (await works at the top level). For data the tree doesn't show.

| Input | Type | Required | Description |
| - | - | - | - |
| `action` | string | yes | Always "javascript\_exec". |
| `text` | string | yes | The code. |
| `tabId` | number | yes | Tab to run it in, from tabs\_context\_mcp. |
| `page` | string | | The site this tab is on now, as tabs\_context\_mcp shows it (example.com). Send it with every call that names a tab: the person approving the call reads it, where the tab number tells them nothing. If the tab is on another site, nothing is done and the error names the right one. |

**Returns:** The value of the code's last expression, as text.

Marked can change or lose things for clients that ask before acting.

### handle\_dialog

*Answer a page dialog*

Answer a JavaScript dialog the page opened (confirm, prompt, "Leave this page?"). While one is open, the tab does nothing else. Alerts are accepted for you and reported in the result.

| Input | Type | Required | Description |
| - | - | - | - |
| `action` | `accept`, `dismiss` | yes | `accept` presses OK, `dismiss` presses Cancel. |
| `text` | string | | The answer to a prompt dialog. |
| `tabId` | number | | Tab to answer it in, from tabs\_context\_mcp. |
| `page` | string | | The site this tab is on now, as tabs\_context\_mcp shows it (example.com). Send it with every call that names a tab: the person approving the call reads it, where the tab number tells them nothing. If the tab is on another site, nothing is done and the error names the right one. |

**Returns:** A line saying how the dialog was answered.

Marked can change or lose things for clients that ask before acting.

### browser\_batch

*Run several steps*

Run several browser tool calls in a row in one round trip, each as \{ name, input } with the same input as on its own. Stops at the first error, and after 48 s in all: the result then says which steps did not run. Coordinates refer to the screenshot taken before this call.

| Input | Type | Required | Description |
| - | - | - | - |
| `actions` | array of object | yes | The steps, each `{ name, input }`, run in order. |

**Returns:** Each step's result in order. When a step fails or the batch runs out of time, the result says which steps did not run.

Marked can change or lose things for clients that ask before acting.

## Asking the person

See [Asks and hand links](https://docs.hotkey.so/concepts/asks.md).

### request\_human

*Ask you for help*

Ask the human to do something in the browser that you can't do yourself: sign in when no password is saved and they haven't given you one, enter a 2FA code you don't have, choose a password for a new account, solve a captcha, or check something and say yes before you send, pay, buy, delete or publish it. Their phone gets a notification and opens the tab; they tap Done when finished, or Can't do it with a note. The result has a `link`. It opens only this tab, with no sign-in, and stops working when they tap Done or after 30 minutes; it is theirs alone, so never post it anywhere else. The ask itself stays in the person's Needs you for up to 24 hours, where they can still do it or copy a new link, until they answer or you cancel it. The link stays on the tab's site and the hops a sign-in makes; if the step must also use other sites (a company sign-in page, a bank's check), name up to three in sites. In a chat with the person (Claude or ChatGPT, a message thread), pass wait\_seconds 0, give them the link and end your turn; when they say they are done, call wait\_for\_human with the id. Otherwise it waits up to wait\_seconds (max 40, the default); if they are not done yet, the result says "pending": call wait\_for\_human with the id to keep waiting. Asking again on the same tab with the same reason while the ask waits returns that ask, with no second alert to the person.

| Input | Type | Required | Description |
| - | - | - | - |
| `reason` | string | yes | What the human should do, in one sentence. |
| `url` | string | | Open this URL in a new tab for them. |
| `tabId` | number | | Tab to ask about, from tabs\_context\_mcp. |
| `page` | string | | The site this tab is on now, as tabs\_context\_mcp shows it (example.com). Send it with every call that names a tab: the person approving the call reads it, where the tab number tells them nothing. If the tab is on another site, nothing is done and the error names the right one. |
| `sites` | array of string | | Other sites the link may open for this step, like "sso.acme.com". (at most 3) |
| `wait_seconds` | number | | How long this call waits for the person, 0 to 40 seconds (default 40). Pass 0 in a chat. |
| `timeout_minutes` | number | | Give up after this long, in minutes: at most 1440 (24 hours, the default). The link lasts 30 minutes either way. (max 1440) |
| `return_url` | string | | Where the link sends the person after they tap Done or Can't do it, such as your app's page (https, or http on localhost). Without it the link ends on its own page. |
| `save_sign_in` | boolean | | For a sign-in or a new account: after the person signs in or signs up through the link, offer them to let this browser sign in to that site by itself next time, so sign\_in works there without them. They choose; nobody can read the password back. The ask opens in a new sealed tab (no script runs in it), named in the result. |

**Returns:** JSON describing the ask: `id` (`ask_…`), `status` (`pending` until the person finishes), `link`, `linkExpiresAt`, `tabId`, `expiresAt`, and `next` while it is pending.

### wait\_for\_human

*Wait for your answer*

Keep waiting for a request\_human to finish. Returns its status: done, pending, cancelled (with the person's note when they couldn't do it), expired or tab-closed. If you give up on it, call cancel\_request so the human is not left with an ask nobody hears. If you gave the person the link in a chat and ended your turn so they can do it, leave it open: it stays in their Needs you and lapses on its own after timeout\_minutes (a day by default). A link that ran out still takes the person to the ask once they sign in, so there is no need to raise it again.

| Input | Type | Required | Description |
| - | - | - | - |
| `id` | string | yes | The ask's id (ask\_…) from request\_human. It names its browser, so no tabId is needed. |
| `wait_seconds` | number | | How long this call waits, 0 to 40 seconds (default 40). |
| `tabId` | number | | Only for an old ask id of 12 hex characters: the tabId its result gave. |

**Returns:** The same JSON as request\_human, with `status` one of `done`, `pending`, `cancelled` (with the person's `note`), `expired` or `tab-closed`.

Marked read-only for clients that ask before acting.

### cancel\_request

*Withdraw a request*

Withdraw a pending request\_human: it disappears from the human's phone and console. Call it whenever you will no longer come back for the answer (not when you only end your turn in a chat so the person can do it).

| Input | Type | Required | Description |
| - | - | - | - |
| `id` | string | yes | The ask's id (ask\_…) from request\_human. |
| `tabId` | number | | Only for an old ask id of 12 hex characters: the tabId its result gave. |

**Returns:** The ask's JSON with `status` `cancelled`.

## Signing in

See [Sign-ins](https://docs.hotkey.so/concepts/sign-ins.md).

### sign\_in

*Sign in with a saved password*

Sign in on the current page with a password the person saved in this browser, or a login from the 1Password vault they connected to it. You never see the password: the browser types it and submits. Call it whenever you reach a sign-in form; if it says nothing is saved for the site, call request\_human. For sign-in in two steps (email, then password), call it again on the second page; on a page that asks for a one-time code, call it again too: a 1Password login with a one-time password types the current code. A 1Password login is typed in a new sealed tab (no script runs in it), named in the result. Passkeys need no call: click the site's passkey button and the browser answers with its own passkey, or asks the person's device.

| Input | Type | Required | Description |
| - | - | - | - |
| `tabId` | number | | Tab to sign in on, from tabs\_context\_mcp. |
| `page` | string | | The site this tab is on now, as tabs\_context\_mcp shows it (example.com). Send it with every call that names a tab: the person approving the call reads it, where the tab number tells them nothing. If the tab is on another site, nothing is done and the error names the right one. |
| `account` | string | | When the site has more than one saved sign-in: the username, or the 1Password login's title, to use. The first result names them. |

**Returns:** Whether the browser signed in, or that nothing is saved for the site.

## Downloads and PDFs

See [Downloads and PDFs](https://docs.hotkey.so/concepts/downloads.md).

### list\_downloads

*List downloads*

List the files in this browser's downloads: what sites sent as a download and pages saved with save\_page\_as\_pdf. Each has its id, name, size in bytes, type, the site it came from, when it started and finished, and its state (downloading, done, failed or canceled). A call that starts a download says so in its result, with the file's name.

| Input | Type | Required | Description |
| - | - | - | - |
| `tabId` | number | | Any tab of the browser whose downloads you mean. Only needed with several browsers and no download id (an id names its browser); without it, the selected one. |

**Returns:** JSON `downloads` with each file's `id` (`dl_…`), name, size, type, site, `started`, `finished` and state.

Marked read-only for clients that ask before acting.

### wait\_for\_download

*Wait for a download*

Wait until a download has finished: the one you name by id or name, or else the one in progress, about to start, or finished since your last wait\_for\_download. Returns its entry once it is done. Waits at most 40 s, or wait\_seconds if less; if it is still downloading then, call it again.

| Input | Type | Required | Description |
| - | - | - | - |
| `id` | string | | The download's id (dl\_…), from list\_downloads or wait\_for\_download. Two downloads of one file share a name, never an id. |
| `name` | string | | The file's name, from the call that started it or list\_downloads. Without an id or a name: the download in progress. |
| `wait_seconds` | number | | How long this call waits, 0 to 40 seconds (default 40). |
| `tabId` | number | | Any tab of the browser whose downloads you mean. Only needed with several browsers and no download id (an id names its browser); without it, the selected one. |

**Returns:** The download's entry as JSON on the first line once it is done (a line on what to do next follows it), or its entry with `next` when it is still downloading after the wait.

Marked read-only for clients that ask before acting.

### read\_download

*Read a downloaded file*

Read a downloaded file by its id or name: a PDF's text, each page marked \[Page N] (up to 32 MB), or a text file: plain text, CSV, JSON, XML and the like, up to 2 MB. Returns up to max\_chars characters (default 50000) from offset. Other files can't be read here: pass them to file\_upload by name, or tell the person they can save them from the console.

| Input | Type | Required | Description |
| - | - | - | - |
| `id` | string | | The download's id (dl\_…), from list\_downloads or wait\_for\_download. Two downloads of one file share a name, never an id. |
| `name` | string | | The file's name, from list\_downloads, when you have no id. |
| `max_chars` | number | | At most this many characters (default 50,000). |
| `offset` | number | | Start at this character (default 0). |
| `tabId` | number | | Any tab of the browser whose downloads you mean. Only needed with several browsers and no download id (an id names its browser); without it, the selected one. |

**Returns:** Up to `max_chars` characters of the file from `offset`. A PDF comes back as text with `[Page N]` marks.

Marked read-only for clients that ask before acting.

### delete\_download

*Delete a downloaded file*

Delete a file from this browser's downloads by its id or name. It can't be brought back. A download still in progress is canceled.

| Input | Type | Required | Description |
| - | - | - | - |
| `id` | string | | The download's id (dl\_…), from list\_downloads or wait\_for\_download. Two downloads of one file share a name, never an id. |
| `name` | string | | The file's name, from list\_downloads, when you have no id. |
| `tabId` | number | | Any tab of the browser whose downloads you mean. Only needed with several browsers and no download id (an id names its browser); without it, the selected one. |

**Returns:** A line saying the file is gone.

Marked can change or lose things for clients that ask before acting.

### save\_page\_as\_pdf

*Save the page as a PDF*

Save the page in a tab as a PDF in this browser's downloads, as printing it to PDF would (the page's print layout, with backgrounds). Use it for receipts, tickets, invoices and confirmations, and when a page asks to print: this browser has no printer, so window\.print() and Print buttons do nothing by themselves. The result has the file's name.

| Input | Type | Required | Description |
| - | - | - | - |
| `name` | string | | A file name for the PDF (default: the page's title). |
| `landscape` | boolean | | Lay the pages out sideways. |
| `paper` | `letter`, `a4` | | Paper size when the page sets none (default letter). |
| `tabId` | number | yes | Tab to save, from tabs\_context\_mcp. |
| `page` | string | | The site this tab is on now, as tabs\_context\_mcp shows it (example.com). Send it with every call that names a tab: the person approving the call reads it, where the tab number tells them nothing. If the tab is on another site, nothing is done and the error names the right one. |

**Returns:** A line with the saved file's name and size in the downloads.

## The clipboard

Each browser has one clipboard, shared by its tabs and kept over restarts. It is never the person's device clipboard, and never holds a password a page copied.

### read\_clipboard

*Read the browser's clipboard*

Read what this browser's clipboard holds now: what a page in it copied (a site's Copy button, a copied link or code), what the person copied in it, or what you set with write\_clipboard. Text comes back as text, an image as an image. Every tab of a browser shares one clipboard, which is the browser's own: never the person's device clipboard, and never a password a page copied.

| Input | Type | Required | Description |
| - | - | - | - |
| `max_chars` | number | | Return at most this many characters of text (default 20000). |
| `tabId` | number | | Any tab of the browser whose clipboard you mean. Only needed with several browsers; without it, the selected one. |

**Returns:** A line saying what the clipboard holds (a link, a code, text or an image), who put it there and when, then the text, or the image as an image.

Marked read-only for clients that ask before acting.

### write\_clipboard

*Copy or paste text or an image in the browser*

Put text or an image on this browser's clipboard, as copying it would, for every tab of the browser and for the person, who sees it in the console. With paste true, also paste it into the focused field of a tab, as Cmd+V or Ctrl+V does: the page gets a real paste event (code boxes split it, editors keep the HTML, image boxes and editors take the image) and plain fields get the text, also inside a frame of another site (a payment or sign-in form). computer's key "cmd+v" pastes what the clipboard holds too.

| Input | Type | Required | Description |
| - | - | - | - |
| `text` | string | | The text, up to 1 MB. Needed unless you give an image. |
| `html` | string | | The same content as HTML, for pages that paste rich text (optional). |
| `image` | string | | An image to copy instead: its bytes as base64 (PNG, JPEG, GIF or WebP, up to 5 MB). It goes on the clipboard as a PNG; text, if given too, goes with it. |
| `paste` | boolean | | Also paste it into the focused element of the tab (default false). Click the field first. |
| `tabId` | number | | Tab to paste into, when paste is true (else any tab of the browser you mean), from tabs\_context\_mcp. |
| `page` | string | | The site this tab is on now, as tabs\_context\_mcp shows it (example.com). Send it with every call that names a tab: the person approving the call reads it, where the tab number tells them nothing. If the tab is on another site, nothing is done and the error names the right one. |

**Returns:** A line saying the clipboard holds the text or the image, or, with `paste`, how the page took the paste: as a paste event, a character at a time into code boxes, or typed.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.