Skip to main content
Glama
alterlab-mcp-server

alterlab-mcp-server

Refresh Session

alterlab_refresh_session
Idempotent

Refresh a web scraping session by rotating cookies, resetting failure counters, and restoring active status after browser re-authentication.

Instructions

Refresh a session by rotating its cookies and resetting failure counters. This is the preferred way to update cookies after re-authenticating in your browser. The session status is reset to active. If cookies are omitted, only the failure counters are reset.

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": {
      "session_id": "<session_id>"
    },
    "name": "alterlab_refresh_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
cookiesNoNew cookies to replace the old ones. If omitted, only failure counters are reset. Cookies as a {name: value} object (e.g. {"session-id": "abc123"}) or as a list (max 100) of cookie objects with metadata: {name, value, domain?, path?, secure?, httpOnly?, sameSite?, expires?}.
headersNoUpdated custom headers to include with the session
session_idYesUUID of the session to refresh

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.9.0
    • removedInput schema / properties / cookies / additionalProperties
      Removed value: -{
      -  "type": "string"
      -}
    • addedInput schema / properties / cookies / anyOf
      Added value: +[
      +  {
      +    "additionalProperties": {
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "items": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "domain": {
      +          "type": "string"
      +        },
      +        "expires": {
      +          "type": "number"
      +        },
      +        "httpOnly": {
      +          "type": "boolean"
      +        },
      +        "name": {
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "path": {
      +          "type": "string"
      +        },
      +        "sameSite": {
      +          "type": "string"
      +        },
      +        "secure": {
      +          "type": "boolean"
      +        },
      +        "value": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "value"
      +      ],
      +      "type": "object"
      +    },
      +    "maxItems": 100,
      +    "type": "array"
      +  }
      +]
    • changedInput schema / properties / cookies / description
      Previous value: -"New cookie key-value pairs to replace the old ones. If omitted, only failure counters are reset."New value: +"New cookies to replace the old ones. If omitted, only failure counters are reset. Cookies as a {name: value} object (e.g. {\"session-id\": \"abc123\"}) or as a list (max 100) of cookie objects with metadata: {name, value, domain?, path?, secure?, httpOnly?, sameSite?, expires?}."
    • removedInput schema / properties / cookies / type
      Removed value: -"object"
  2. First observedv1.5.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only declare it is a non-destructive, idempotent, open-world write; the description adds substantive behavior beyond that: cookies get rotated, failure counters reset, status forced back to active, and the conditional path when cookies are omitted. It does not state permission requirements or what the response contains, keeping it short of a 5.

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?

Three short sentences, front-loaded with the core action and its effects, with the conditional fallback last. No filler, though the middle sentence shifts from behavior to usage advice in a slightly disjointed way.

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 a three-parameter mutation with a fully described schema and no output schema, the description covers the essential action and side effects. It leaves unstated what the tool returns and whether the session must currently exist or be in a particular state, which are minor gaps.

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 coverage is 100%, so the schema already documents session_id, cookies formats and headers. The description's one added semantic — omitting cookies means only counters are reset — largely restates the cookies schema description, so it adds little unique meaning.

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 and resource ('Refresh a session') and immediately enumerates the concrete effects: rotating cookies, resetting failure counters, resetting status to active. This distinguishes it from the CRUD-ish siblings like alterlab_update_session or alterlab_get_session.

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

Usage Guidelines3/5

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

Gives one clear usage scenario — 'preferred way to update cookies after re-authenticating in your browser' — which is genuine when-to-use guidance. However, it never explains how it differs from alterlab_update_session, the obvious alternative for changing session data, so the agent must infer the boundary.

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