Skip to main content
Glama
alterlab-mcp-server

alterlab-mcp-server

Update Session

alterlab_update_session
Idempotent

Update a stored session's name, cookies, headers, expiration, or notes without deleting and recreating it. Replace all cookies or headers in one call when rotating credentials.

Instructions

Update a stored session's properties. You can change the name, rotate cookies, update custom headers, set a new expiration, or add notes. When cookies are provided, they replace ALL existing cookies (not merged). Use this instead of delete+recreate when you need to rotate credentials.

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_update_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoNew name for the session
notesNoNotes or description for this session
cookiesNoNew cookies — replaces ALL existing cookies. 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?}.
headersNoNew custom headers — replaces ALL existing headers
expires_atNoNew expiration date in ISO 8601 format (e.g., '2026-12-31T23:59:59Z')
session_idYesUUID of the session to update
notify_on_failureNoEnable or disable the validation-failure notification
auto_refresh_enabledNoEnable or disable proactive expiry detection and health checks
notify_before_expiryNoEnable or disable the before-expiry notification

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv1.9.0
    • addedInput schema / properties / auto_refresh_enabled
      Added value: +{
      +  "description": "Enable or disable proactive expiry detection and health checks",
      +  "type": "boolean"
      +}
    • 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 — replaces ALL existing cookies (e.g., {\"session-id\": \"new123\", \"session-token\": \"newxyz\"})"New value: +"New cookies — replaces ALL existing cookies. 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"
    • addedInput schema / properties / notify_before_expiry
      Added value: +{
      +  "description": "Enable or disable the before-expiry notification",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / notify_on_failure
      Added value: +{
      +  "description": "Enable or disable the validation-failure notification",
      +  "type": "boolean"
      +}
  2. First observedv1.5.0

TDQS

A3.6/5.0
Behavior3/5

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

The description adds genuinely useful behavior beyond the annotations: cookies and headers are full replacements, not merges ('replaces ALL existing cookies (not merged)'). That aligns with idempotentHint=true and clarifies that destructiveHint=false means no resource deletion, merely field replacement. However, it does not say what happens to omitted fields (unchanged?), what errors occur on an expired session, or what the call returns.

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 tight sentences, front-loaded with the core action, then the field list, then the two highest-value caveats (replacement semantics and the delete+recreate alternative). The middle field enumeration partially duplicates the schema property names, minor waste but it aids scanning.

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 9-parameter, 1-required mutation tool with no output schema, the description covers the main use case, the most dangerous semantic (wholesale cookie/header replacement), and the key alternative. It leaves out return-value expectations and the behavior of the three notification/auto-refresh flags, which is the main remaining gap.

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 cookie formats, ISO 8601 expiry, and UUID format are already documented; the description only restates the replacement rule the schema itself states. It also omits the three boolean flags (notify_on_failure, auto_refresh_enabled, notify_before_expiry), which appear only in the schema. Baseline 3 is appropriate when the schema carries the parameter burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Update a stored session's properties') and enumerates the mutable fields: name, cookies, headers, expiration, notes. It differentiates from delete+recreate but does not distinguish itself from the closely related siblings alterlab_refresh_session or alterlab_validate_session, which an agent could easily confuse with cookie rotation.

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?

Gives an explicit when-to-use rule: 'Use this instead of delete+recreate when you need to rotate credentials.' That is a real routing decision. It stops short of naming alterlab_refresh_session as the alternative when only cookies/expiry need renewal, so one sibling comparison is left to inference.

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