Skip to main content
Glama

Save login state

save_login_state

Log in once with step-based actions, then save cookies and localStorage to a reusable auth file so other tools can reuse the session.

Instructions

Log in once with steps and save cookies + localStorage to .qa-mcp/auth/.json for other tools. Use ${ENV:NAME} for credentials; values are never echoed.

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": {
      "url": "<url>",
      "steps": "<steps>"
    },
    "name": "save_login_state"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYes
nameNodefault
stepsYes
success_locatorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations at all, the description carries the full behavioral burden. It does disclose two valuable traits: that credentials pass through ${ENV:NAME} and are 'never echoed'. However, it says nothing about what happens if login fails, whether existing state at that path is overwritten, or how persistence interacts with the tool's success condition.

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?

Two sentences, both front-loaded with the essential operation and its output location, followed by the security convention. Nothing is filler and the most important fact (persisted cookie/localStorage state) comes first.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A side-effecting authentication tool with no annotations, no output schema and four parameters at 0% schema coverage needs more than two sentences. The unexplained 'success_locator' and the silence on failure/overwrite behavior leave real gaps for correct invocation.

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 0% at the top level, so the description must compensate. It explains the 'name' parameter's filename role and the ${ENV:NAME} convention relevant to step values, but leaves 'url' and especially 'success_locator' — an important behavioral parameter — entirely unexplained. Partial compensation only.

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?

The description states a specific verb and resource: perform a scripted login ('log in once with steps') and persist cookies + localStorage to a named JSON file. The destination path '.qa-mcp/auth/<name>.json' and the phrase 'for other tools' make the artifact-reuse purpose unambiguous. It stops short of naming a sibling, so it is clear but not sibling-differentiated.

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?

'Log in once ... for other tools' implies the usage context (do this before other authenticated operations) but never states when not to use it, whether it overwrites an existing saved state, or which sibling to use for verification. Usage is inferable but not spelled out.

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