Skip to main content
Glama

Release a session

spicrawl_session_release
DestructiveIdempotent

End a session when you are done with it: frees its exit IP and browser state; it can no longer be used with spicrawl_scrape. Its stored cookies and storage are purged and cannot be recovered; start a new session and log in again to continue. The record stays visible (status released) so its history can still be inspected. Refused while a scrape holds the session's lease unless force is true. Returns the session object.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNoBreak an active lease (a scrape currently using the session). Only set when you know it is safe.
session_idYesThe session id returned by spicrawl_session_create or spicrawl_session_list.

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. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only say destructive/idempotent/not-read-only; the description goes well beyond them by disclosing exactly what is destroyed (exit IP, browser state, cookies and storage, irrecoverably), what survives (the record, status `released`, history inspectable), the lease-refusal behavior, and the `force` override. This is the richest part of the definition.

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

Conciseness5/5

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

Four tight clauses in two sentences, front-loaded with the action and its consequences, then the refusal rule and return. No filler and no repetition of the title.

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?

For a destructive, idempotent session-ending tool with an output schema already present, the description covers everything an agent needs: scope, irreversibility, downstream effects on spicrawl_scrape, retained record, and the lease conflict path. Return-value explanation is correctly omitted since the output schema carries it.

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 the missing trigger condition for `force` — refusal happens while a scrape holds the session's lease — which the schema only describes as 'break an active lease'. That contextual 'when is force needed' detail is genuine added value over the field-level text.

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?

Specific verb + resource ('End a session') with the consequences spelled out: frees exit IP and browser state, purges cookies/storage, record remains as status `released`. This distinguishes it from the sibling spicrawl_session_delete, which would imply record removal, without the agent having to open either schema.

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

Usage Guidelines4/5

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

States the trigger clearly ('when you are done with it'), names the blocked follow-on ('can no longer be used with spicrawl_scrape'), and gives the recovery path ('start a new session and log in again'). It also documents the refusal condition and the escape hatch (`force` true). It never explicitly routes the agent to spicrawl_session_delete as the alternative, which keeps it just short of a 5.

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