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.
guest_minutesNoGuest link to the identity's LIVE window, for a person who is not a member of this workspace (e.g. to type their own card on a payment page). Pass the minutes the link works (1-120, 30 is usual): the answer holds guest_url and expires_at, and the window must already be open (browser.handoff with prepare=true). Pass 0 to revoke the link. The guest sees and types into that one window only, with no login. Closing the window also ends the link. Needs EDIT. `url` is not needed. OMIT for a normal handoff.
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. Changed1 schema field changed
    • addedInput schema / properties / guest_minutes
      Added value: +{
      +  "description": "Guest link to the identity's LIVE window, for a person who is not a member of this workspace (e.g. to type their own card on a payment page). Pass the minutes the link works (1-120, 30 is usual): the answer holds guest_url and expires_at, and the window must already be open (browser.handoff with prepare=true). Pass 0 to revoke the link. The guest sees and types into that one window only, with no login. Closing the window also ends the link. Needs EDIT. `url` is not needed. OMIT for a normal handoff.",
      +  "type": "integer"
      +}
  2. 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."
  3. 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."
  4. 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"
      +]
  5. 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"
      +}
  6. Added

TDQS

A4.5/5.0
Behavior4/5

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

Beyond the annotations (readOnly, openWorld, idempotent, non-destructive), the description discloses genuinely useful operating facts: the window lives 30 minutes and closes if no link is sent, a prepared window is tied to the workspace, close only works on unopened windows, and prepare/guest_minutes require EDIT role. There is a mild tension with readOnlyHint=true since the tool spins up server-side windows and revokes guest links, but it never claims to write data, so it is not a contradiction.

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?

The primary case is front-loaded in the first sentence, and the remaining paragraphs are cleanly segmented by mode (default, prepare=True, pending identity). It is dense and long with heavy parentheticals, but each paragraph carries distinct information rather than repeating the schema.

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

Completeness4/5

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

For an 8-parameter tool with no output schema, the description covers the return shapes (handoff link, page_id, guest_url plus expires_at, whether a window was closed) and the multi-step workflow around the tool. The only thin area is failure behavior, e.g. what happens if the URL is off-domain or the window already closed.

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 100%, so the baseline is 3, but the description adds workflow meaning the schema cannot: prepare's page_id is what browser.fill / browser.click drive, confirm_agent_sign_in applies only to a PENDING identity and pairs with browser.save_session, and guest_minutes yields guest_url / expires_at while requiring an already-open window. These are usage semantics, not restatements.

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 the exact trigger (site asks for 2FA, captcha, identity check, re-login that only the person can do), the required inputs (identity name + URL), and the outcome (a link the person clicks to land on their browser identity already on that page). It is unmistakably distinct from siblings like browser_open or browser_create_identity.

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 routes three distinct scenarios explicitly: a normal verification handoff, a prepare=true flow where the agent fills the form first with browser.fill / browser.click, and a pending-identity flow using prepare=true + confirm_agent_sign_in=true followed by browser.save_session(page_id). It also gives the when-not rule for repeat pages — navigate the SAME prepared window rather than preparing a new one.

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.