Skip to main content
Glama

Create a browsing session

spicrawl_session_create

Create a session: a persistent browser identity (cookie jar, localStorage, a fixed rendering tier and, by default, a sticky exit IP) that survives across scrapes. Use it for multi-step flows — log in, then fetch pages behind the login — by passing the returned id as session_id to every spicrawl_scrape call that should share the state. The rendering tier is fixed for the session's lifetime and every scrape on the session runs on it. Leave engine out and one is chosen for you. Release the session with spicrawl_session_release when done. Returns the session object (id, engine, status, sticky_key, proxy, expires_at).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
engineNoRendering tier fixed for the session's lifetime. Optional: leave it out and one is chosen for you. `fetch` is plain HTTP; `js` is JavaScript rendering and refuses `actions`, `block_resources`, screenshots and PDFs; `browser` is a full browser.
rotate_ipNoComing soon: not available yet, do not send. Keep the cookie jar stable but rotate the managed-pool exit IP per request. Cannot combine with sticky_key.
sticky_keyNoComing soon: not available yet, do not send. Pin the managed-pool exit IP to this key; sessions sharing a key share an exit. Cannot combine with rotate_ip.
fingerprintNoComing soon: not available yet, do not send. Browser fingerprint pin, stored verbatim. Needs a full-browser session (`engine: "browser"`).
region_poolNoComing soon: not available yet, do not send. Managed-pool region to draw the exit from.
ttl_secondsNoIdle lifetime in seconds (min 30, default 1800; the organization's maximum is enforced, not clamped).
domain_scoresNoSeed per-domain error scores (usually copied from a spicrawl_session_context dump).
premium_proxyNoComing soon: not available yet, do not send. Use a residential managed-pool exit, exactly as on spicrawl_scrape.
proxy_countryNoComing soon: not available yet, do not send. ISO-3166 alpha-2 exit country; requires premium_proxy.
session_contextNoSeed the session's state (cookies, storage) — e.g. the `session_context` object from spicrawl_session_context, to clone a session.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesSession id; pass it as `session_id` to spicrawl_scrape.
leaseNoPresent only while a scrape holds the session; release and delete are refused until it lapses unless `force`.
proxyNoThe session's exit intent (never an IP or endpoint).
engineNoRendering tier the session is bound to: fetch, js or browser.
statusNoactive, released or expired; derived from the clock, and only `active` sessions can be used.
contextNoSize summary of the stored context (counts only, no secrets); null once the session is not active.
retiredNoWhy the session was taken out of service (expired, usage_exhausted, explicit); absent while usable.
warningsNoDecisions made on your behalf at creation, e.g. a TTL reduced to the organization maximum.
created_atNoCreation time, RFC 3339 UTC.
expires_atNoCurrent expiry (slides on use), RFC 3339 UTC.
project_idNoProject the session belongs to.
sticky_keyNoExit pin in use (empty when rotate_ip was set).
fingerprintNoBrowser fingerprint, as stored.
released_atNoRelease time, on released sessions, RFC 3339 UTC.
usage_countNoSuccessful scrapes that used the session.
last_used_atNoLast successful scrape, RFC 3339 UTC; null if never used.
domain_scoresNoPer-domain standing, keyed by domain. Omitted when empty.
hard_expires_atNoFixed ceiling the expiry never passes, RFC 3339 UTC.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {
      +    "context": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": true,
      +          "properties": {
      +            "bytes": {
      +              "description": "Serialised size of the stored context.",
      +              "type": "integer"
      +            },
      +            "cookies": {
      +              "description": "Cookies stored.",
      +              "type": "integer"
      +            },
      +            "origins": {
      +              "description": "Distinct origins with stored web storage.",
      +              "type": "integer"
      +            },
      +            "schema_version": {
      +              "type": "integer"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Size summary of the stored context (counts only, no secrets); null once the session is not active."
      +    },
      +    "created_at": {
      +      "description": "Creation time, RFC 3339 UTC.",
      +      "type": "string"
      +    },
      +    "domain_scores": {
      +      "additionalProperties": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "bad": {
      +            "description": "Failed requests counted.",
      +            "type": "integer"
      +          },
      +          "good": {
      +            "description": "Successful requests counted.",
      +            "type": "integer"
      +          },
      +          "last_updated": {
      +            "description": "Last update, Unix milliseconds.",
      +            "type": "number"
      +          },
      +          "retired": {
      +            "description": "Hard block for this domain; use a new session for it.",
      +            "type": "boolean"
      +          },
      +          "score": {
      +            "description": "Error score; rises on failures, decays on successes. Blocked at 3.",
      +            "type": "number"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "description": "Per-domain standing, keyed by domain. Omitted when empty.",
      +      "type": "object"
      +    },
      +    "engine": {
      +      "description": "Rendering tier the session is bound to: fetch, js or browser.",
      +      "type": "string"
      +    },
      +    "expires_at": {
      +      "description": "Current expiry (slides on use), RFC 3339 UTC.",
      +      "type": "string"
      +    },
      +    "fingerprint": {
      +      "additionalProperties": {},
      +      "description": "Browser fingerprint, as stored.",
      +      "type": "object"
      +    },
      +    "hard_expires_at": {
      +      "description": "Fixed ceiling the expiry never passes, RFC 3339 UTC.",
      +      "type": "string"
      +    },
      +    "id": {
      +      "description": "Session id; pass it as `session_id` to spicrawl_scrape.",
      +      "type": "string"
      +    },
      +    "last_used_at": {
      +      "description": "Last successful scrape, RFC 3339 UTC; null if never used.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "lease": {
      +      "additionalProperties": true,
      +      "description": "Present only while a scrape holds the session; release and delete are refused until it lapses unless `force`.",
      +      "properties": {
      +        "expires_at": {
      +          "description": "When the lease lapses at the latest, RFC 3339 UTC.",
      +          "type": "string"
      +        },
      +        "holder": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "project_id": {
      +      "description": "Project the session belongs to.",
      +      "type": "string"
      +    },
      +    "proxy": {
      +      "additionalProperties": true,
      +      "description": "The session's exit intent (never an IP or endpoint).",
      +      "properties": {
      +        "country": {
      +          "description": "Lowercase alpha-2 exit country, when one was requested.",
      +          "type": "string"
      +        },
      +        "region_pool": {
      +          "description": "Regional pool requested at creation.",
      +          "type": "string"
      +        },
      +        "tier": {
      +          "description": "Exit tier: datacenter or residential.",
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "released_at": {
      +      "description": "Release time, on released sessions, RFC 3339 UTC.",
      +      "type": "string"
      +    },
      +    "retired": {
      +      "description": "Why the session was taken out of service (expired, usage_exhausted, explicit); absent while usable.",
      +      "type": "string"
      +    },
      +    "status": {
      +      "description": "active, released or expired; derived from the clock, and only `active` sessions can be used.",
      +      "type": "string"
      +    },
      +    "sticky_key": {
      +      "description": "Exit pin in use (empty when rotate_ip was set).",
      +      "type": "string"
      +    },
      +    "usage_count": {
      +      "description": "Successful scrapes that used the session.",
      +      "type": "integer"
      +    },
      +    "warnings": {
      +      "description": "Decisions made on your behalf at creation, e.g. a TTL reduced to the organization maximum.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "id"
      +  ],
      +  "type": "object"
      +}
  2. Changed3 schema fields changed
    • changedInput schema / properties / engine / description
      Previous value: -"Engine pinned for the session's lifetime. Default: `obscura` if deployed, else `chromium`, else `fetch`. `camoufox` is coming soon: do not pin it yet."New value: +"Rendering tier fixed for the session's lifetime. Optional: leave it out and one is chosen for you. `fetch` is plain HTTP; `js` is JavaScript rendering and refuses `actions`, `block_resources`, screenshots and PDFs; `browser` is a full browser."
    • changedInput schema / properties / engine / enum
      Previous value: -[
      -  "fetch",
      -  "obscura",
      -  "chromium",
      -  "camoufox"
      -]New value: +[
      +  "fetch",
      +  "js",
      +  "browser"
      +]
    • changedInput schema / properties / fingerprint / description
      Previous value: -"Coming soon: not available yet, do not send. Camoufox fingerprint pin, stored verbatim. Only valid with engine `camoufox`."New value: +"Coming soon: not available yet, do not send. Browser fingerprint pin, stored verbatim. Needs a full-browser session (`engine: \"browser\"`)."
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations are sparse (readOnlyHint=false, openWorldHint=false, idempotentHint=false, destructiveHint=false). The description adds that the rendering tier is fixed for the session's lifetime, that sessions survive across scrapes, and that they must be released with spicrawl_session_release, which is meaningful for resource management. However, it doesn't disclose default TTL or expiration behavior beyond what the schema already shows.

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 description is a single dense paragraph with no wasted sentences and is front-loaded with the essential definition. It is slightly long, but every clause (persistent identity, multi-step flow, engine fixed, release step) earns its place.

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?

Given that an output schema exists, the description doesn't need to enumerate return values, though it helpfully mentions key fields. It covers the critical lifecycle (create → use via session_id → release), which is exactly what an agent needs for this stateful resource.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents every parameter thoroughly. The description adds a small amount of guidance (leave `engine` out and one is chosen) but not enough to go beyond the baseline 3 when the schema does all the heavy lifting.

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?

States a specific verb (Create) and resource (a session/browsing identity), and elaborates exactly what a session is: a persistent state container (cookie jar, localStorage, fixed rendering tier, sticky exit IP). It distinguishes itself from siblings by naming spicrawl_session_release and spicrawl_scrape and describing their relationship.

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?

Explicitly says when to use it (multi-step flows—log in then fetch pages behind the login) and how to use it with a sibling (pass the returned `id` as `session_id` to spicrawl_scrape calls that should share state). It also names a related lifecycle tool, spicrawl_session_release, for cleanup.

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