Skip to main content
Glama

browser_handoff

Read-onlyIdempotent

When a site asks for verification (2FA, captcha, identity check, re-login) that only the person can do, call this tool with the browser identity name and the URL that needs them. Returns a link to give the person — clicking it opens their browser identity already on that page. When they finish they press Done, and you can continue. For several pages in a row, navigate the SAME prepared window rather than preparing a new one: the person keeps watching one window.

With prepare=True (optional): start the identity's browser server-side on the URL, attach it for form-filling, and return a page_id. Use the page_id with browser.fill / browser.click to fill the form in the live browser before giving the person the link — they will see it already filled and only need to review and complete verification steps that only they can do (CAPTCHA, consent, 2FA code). The window stays open for 30 minutes; if you do not send the link within that time, the window closes and the person must start over.

A PENDING identity (just made with browser.create_identity, nobody signed in yet) when the person gave you what the sign-in needs (e.g. a one-time code they forwarded): call with prepare=true and confirm_agent_sign_in=true. Its sign-in window opens server-side and you get a page_id; sign in there yourself, check the page shows the signed-in state, then call browser.save_session(page_id): the identity becomes active and keeps the session. Nobody has to open a link.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "identity": "<identity>"
    },
    "name": "browser_handoff"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoThe URL that needs the person's attention. Must be https or http, and on the same domain as the identity's origin (e.g. https://dashboard.stripe.com/auth/verify). Subdomains are allowed.
closeNoIf true (optional, default false): close the identity's prepared window that nobody has opened yet. Use this when you no longer need the window you prepared with prepare=true; a window the person has opened is left to them. Returns whether a window was closed. Requires EDIT role (same as prepare). The window only closes if it belongs to this workspace. OMIT for a normal handoff.
reasonNoWhy the person is needed (optional, for context). E.g. '2FA code entry', 'identity verification', 'security check'.
prepareNoIf true (optional, default false): start the identity's browser server-side on the URL and attach it so you can fill the form with browser.fill / browser.click before giving the person the link. Returns a page_id you can drive with the generic browser tools, plus the handoff link. False or omitted: just build and return the link — the browser starts when the person opens it.
identityYesThe browser identity, by name or id (as browser.open takes it). An active identity of this workspace, or a pending one with prepare=true and confirm_agent_sign_in=true.
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.
confirm_agent_sign_inNoPass true together with prepare=true on a PENDING identity: you sign in yourself in its window with what the person gave you (e.g. a one-time code), and the session is then stored for the workspace by browser.save_session. Pass it only when the person asked you to sign in for them. OMIT for an active identity.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / confirm_agent_sign_in
      Added value: +{
      +  "description": "Pass true together with prepare=true on a PENDING identity: you sign in yourself in its window with what the person gave you (e.g. a one-time code), and the session is then stored for the workspace by browser.save_session. Pass it only when the person asked you to sign in for them. OMIT for an active identity.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / identity / description
      Previous value: -"The browser identity, by name or id (as browser.open takes it). Must be an active identity in this workspace."New value: +"The browser identity, by name or id (as browser.open takes it). An active identity of this workspace, or a pending one with prepare=true and confirm_agent_sign_in=true."
  2. Changed1 schema field changed
    • changedInput schema / properties / close / description
      Previous value: -"If true (optional, default false): close the identity's prepared window that nobody has opened yet. Use this when you no longer need the window you prepared with prepare=true; a window the person has opened is left to them. Returns whether a window was closed. Requires EDIT role (same as prepare). The window only closes if it belongs to this workspace."New value: +"If true (optional, default false): close the identity's prepared window that nobody has opened yet. Use this when you no longer need the window you prepared with prepare=true; a window the person has opened is left to them. Returns whether a window was closed. Requires EDIT role (same as prepare). The window only closes if it belongs to this workspace. OMIT for a normal handoff."
  3. Changed2 schema fields changed
    • addedInput schema / properties / close
      Added value: +{
      +  "description": "If true (optional, default false): close the identity's prepared window that nobody has opened yet. Use this when you no longer need the window you prepared with prepare=true; a window the person has opened is left to them. Returns whether a window was closed. Requires EDIT role (same as prepare). The window only closes if it belongs to this workspace.",
      +  "type": "boolean"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "identity",
      -  "url"
      -]New value: +[
      +  "identity"
      +]
  4. Changed1 schema field changed
    • addedInput schema / properties / prepare
      Added value: +{
      +  "description": "If true (optional, default false): start the identity's browser server-side on the URL and attach it so you can fill the form with browser.fill / browser.click before giving the person the link. Returns a page_id you can drive with the generic browser tools, plus the handoff link. False or omitted: just build and return the link — the browser starts when the person opens it.",
      +  "type": "boolean"
      +}
  5. Added

TDQS

A4.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The prose adds substantial behavior beyond the annotations: a 30-minute window lifetime before the person must restart, an EDIT-role requirement for prepare/close, workspace scoping for window closure, and what the person sees after clicking the link. However, it directly contradicts readOnlyHint=true — prepare starts a browser server-side, close terminates an existing window, and confirm_agent_sign_in drives a sign-in and persists a session, all of which are state-changing operations the annotation denies.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with the primary handoff case, then the prepare path, then the pending-identity variant, so an agent can stop reading once it has its case. It is long and partially duplicates the parameter descriptions (prepare's effect appears in both prose and schema), but each paragraph carries a distinct decision.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description still tells the agent what comes back (a handoff link, a page_id under prepare, whether a window was closed), plus the timeout, role, and workspace constraints needed to call it correctly. Nothing material is missing for a 7-parameter, open-world tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3, but the description genuinely adds meaning: it explains what prepare buys you (a page_id drivable with generic browser tools), the consequence of the 30-minute window expiring, and the pending-identity precondition for confirm_agent_sign_in. The close parameter's semantics are only partly echoed in prose, which keeps it from a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names a specific verb and resource — hand a browser identity to the person when a site demands verification — and enumerates the trigger cases (2FA, captcha, identity check, re-login). It is clearly separable from siblings like browser_open, browser_create_identity, and browser_attach_identity because it names the downstream tools it feeds (browser.fill, browser.click, browser.save_session).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states explicitly when to call (person-only verification steps), when to add prepare=true (you need to pre-fill a form via page_id), when to add confirm_agent_sign_in=true (pending identity plus a credential the person forwarded), and when to use close=true (a prepared window nobody opened). It even advises reusing the same prepared window for consecutive pages instead of preparing new ones.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.