Skip to main content
Glama

Manage auth/session state (cookies, storage, headers)

manage_session

Manage authenticated browsing sessions by setting cookies, localStorage, and headers, plus saving and loading snapshots to restore state after crashes.

Instructions

Reach authenticated pages. set adds cookies, localStorage seeds and extra headers to the persistent session, applied to the live context and replayed onto any future one so they survive a crash. save snapshots cookies + localStorage to .agent-eyes/sessions/.json (gitignored — it holds plaintext tokens); load restores a snapshot by recreating the context, after which you navigate to use it; clear drops everything.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoSnapshot name under .agent-eyes/sessions/. Required for save and load.
actionYesset = add cookies/localStorage/headers; clear = drop all state and rebuild a clean context; save = snapshot cookies + localStorage to disk; load = restore a snapshot, then navigate to use it.
cookiesNoCookies in Playwright addCookies shape; each needs url, or domain+path.
headersNoExtra headers for every request, merged into any already set.
localStorageNolocalStorage to seed per origin, applied on the next navigation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.29.0

TDQS

A4.6/5.0
Behavior4/5

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

Even without annotations, the description discloses key behaviors: session persistence across crashes, snapshot creation includes plaintext tokens (sensitivity), load recreates context requiring subsequent navigation, and clear rebuilds a clean context. It does not mention side effects like whether headers persist across navigations or if cookies are domain-restricted, but given the tool's inherent complexity, this is a strong disclosure.

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?

The description is tightly packed into three sentences with no fluff. It front-loads the purpose ('Reach authenticated pages') and then lists each action with its effect, making it easy to scan. Every clause adds operational value, including the warning about plaintext tokens.

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?

Given the complexity (5 params, nested objects, 4 distinct actions), the description covers the core workflow and key constraints (persistence, navigation requirement, gitignore warning). It lacks explicit detail on error handling or edge cases (e.g., what happens if save targets an existing name), but the schema and description together are sufficient for an agent to invoke the tool correctly in most scenarios.

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 each parameter. The description adds value by clarifying the role of 'name' (required for save/load) and the meaning of 'action' enum in context, but it doesn't elaborate on all nested properties (e.g., cookie attributes) beyond what the schema says. Still, the description enhances the action semantics beyond a simple enum.

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?

The description clearly states it manages auth/session state (cookies, storage, headers) and enumerates each action (set, save, load, clear) with precise effects on the persistent session. It distinguishes itself from sibling tools like authenticate_login (which likely handles credential-based login) and manage_vault (which likely stores secrets), making its purpose unmistakable.

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?

The description provides explicit usage guidance for each action: set adds cookies/localStorage/headers, save snapshots to disk, load restores a snapshot and then navigate to use it, clear drops everything. It also includes a critical warning about the snapshot file being gitignored due to plaintext tokens, helping the agent decide when to use this tool (e.g., for reaching authenticated pages) and what precautions to take.

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