Skip to main content
Glama

Browser (CDP) connect URL

spicrawl_browser_connect_url

Mints a single-use connect URL for Spicrawl's remote browser (GET /v1/browser, a DevTools Protocol (CDP) WebSocket) so YOUR code can drive it with any CDP client, using the URL as the browser WebSocket endpoint. It calls POST /v1/browser/token and returns a ws:// or wss:// URL carrying a short-lived token, never the API key: the URL works ONCE, within 60 seconds, and only with the options given here (editing them in the URL is refused), so call this right before connecting and again for every new session. Prefer sending the key as an Authorization header when the client supports headers on the WebSocket upgrade: then connect to the plain /v1/browser URL with 'Authorization: Bearer ' and no token is needed. The key must carry the browser scope. Parameter errors are reported when minting. The result's session_id names the session once connected: when a page needs a person (a login, a one-time code, a captcha), pass it to spicrawl_browser_live_view for a link they can open, and to spicrawl_browser_control to see when they hand control back.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "spicrawl_browser_connect_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
proxyNoYour own proxy, as http://user:pass@host:port. Replaces our pool, so proxy_country, proxy_region and sticky_key cannot be combined with it. Kept out of the returned URL.
engineNoRendering tier of the remote browser: `browser` (full browser, full protocol; the default) or `js` (lighter JavaScript rendering with a smaller protocol surface). A tier your plan does not include is refused.
sticky_keyNoKeep one exit IP for the session under this key (2-64 letters, digits, hyphens). Omit to rotate (the default).
session_ttlNoSession lifetime in seconds, 60-900. Default 180.
proxy_regionNoBroader exit region/pool name; 'global' means no constraint. Mutually exclusive with proxy_country.
proxy_countryNoExit country, ISO-3166 alpha-2 lowercase (e.g. 'de'). Mutually exclusive with proxy_region.

Output Schema

NameRequiredDescriptionDefault
urlYesws:// or wss:// connect URL carrying a single-use token (never the API key); use it as the CDP browser WebSocket endpoint.
notesNoUsage notes for the connect URL.
expires_atNoWhen the token expires, RFC 3339 UTC (60 s after minting).
session_idNoNames the session once connected; for spicrawl_browser_live_view and spicrawl_browser_control.
single_useYesAlways true: the URL works for one connection.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / session_id
      Added value: +{
      +  "description": "Names the session once connected; for spicrawl_browser_live_view and spicrawl_browser_control.",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {
      +    "expires_at": {
      +      "description": "When the token expires, RFC 3339 UTC (60 s after minting).",
      +      "type": "string"
      +    },
      +    "notes": {
      +      "description": "Usage notes for the connect URL.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "single_use": {
      +      "description": "Always true: the URL works for one connection.",
      +      "type": "boolean"
      +    },
      +    "url": {
      +      "description": "ws:// or wss:// connect URL carrying a single-use token (never the API key); use it as the CDP browser WebSocket endpoint.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "url",
      +    "single_use"
      +  ],
      +  "type": "object"
      +}
  3. Changed3 schema fields changed
    • changedInput schema / properties / engine / description
      Previous value: -"Browser engine. Default: the deployment's default (chromium). 'obscura' cannot run headful."New value: +"Rendering tier of the remote browser: `browser` (full browser, full protocol; the default) or `js` (lighter JavaScript rendering with a smaller protocol surface). A tier your plan does not include is refused."
    • changedInput schema / properties / engine / enum
      Previous value: -[
      -  "chromium",
      -  "obscura"
      -]New value: +[
      +  "browser",
      +  "js"
      +]
    • removedInput schema / properties / headless
      Removed value: -{
      -  "description": "false = headful browser with a display (desktop-sized screen). Omit for the deployment default.",
      -  "type": "boolean"
      -}
  4. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, idempotentHint=false, openWorldHint=true), the description discloses the traits that actually govern correct use: the URL is single-use, expires in 60 seconds, carries a short-lived token rather than the API key, rejects edited options, and requires the `browser` scope. It even states where errors surface (at minting). None of this is recoverable from the annotations.

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 core (mint a single-use CDP URL) is front-loaded, and the later clauses cover expiry, the header alternative, and sibling handoff — all load-bearing. It is nonetheless one very dense paragraph with parenthetical asides, so a reader must work to separate the connection contract from the session_id routing advice.

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?

Auth requirement (scope `browser`, key vs token), lifetime, one-shot semantics, error behavior, and the role of `session_id` are all covered, and the output schema carries the return shape. For a credential-minting tool whose misuse silently breaks connections, that is complete.

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 schema already documents all six options, making 3 the baseline. The description still adds real meaning by explaining that the supplied options are bound into the token and that editing them in the returned URL is refused, which tells the agent the parameters are effectively immutable after minting.

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?

"Mints a single-use connect URL for Spicrawl's remote browser ... a DevTools Protocol (CDP) WebSocket" names a specific verb and resource and states what the caller can then do with it. It also grounds the tool in concrete endpoints (GET /v1/browser, POST /v1/browser/token), which no sibling shares.

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 gives explicit timing rules ("call this right before connecting and again for every new session") and an explicit alternative path — send the key as an Authorization header to the plain /v1/browser URL and skip this tool entirely. It also routes the agent onward by naming spicrawl_browser_live_view and spicrawl_browser_control for the human-in-the-loop case.

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.

Resources