Skip to main content
Glama

login

Automate login with password, OAuth tokens, or HTTP Basic auth. Persists session state for reuse across automated tests.

Instructions

Orchestrate login and persist Playwright storageState. Strategies: password form, HTTP Basic, bearer/token inject, OAuth cookies/tokens, manual/OAuth window, reuse profileId. Auto (headless) when enough creds/tokens are provided; otherwise opens a headed window and waits.

DO NOT use this tool for Google OAuth / Sign in with Google, Microsoft/Apple/Discord social login, Cloudflare bot walls, or other restricted IdPs — those require set_session_auth. If you are about to open a headed login for Google OAuth, stop and follow the Restricted auth user-message template instead.

Example input:

{
  "siteUrl": "https://app.example.com",
  "authUrl": "https://app.example.com/login",
  "username": "user@example.com",
  "password": "secret"
}

Example success: { "ok": true, "profileId": "prof_abc", "strategy": "password" }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
oauthNoOAuth tokens / cookies / storage to inject
tokensNoGeneric bearer / cookie / storage tokens
authUrlYesLogin / OAuth start URL
siteUrlYesTarget application URL after login
passwordNoPassword for password login
usernameNoUsername or email for password login
profileIdNoReuse an existing auth profile id instead of logging in again
timeoutMsNoMax wait ms (default 120000)
httpCredentialsNoHTTP Basic auth credentials
Behavior4/5

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

Discloses auto vs headed behavior, persistence of storageState, and waiting. No annotations provided, so description bears full burden. Lacks details on error handling or side effects but is generally transparent.

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?

Well-structured with front-loaded purpose, strategies, warning, and example. Slightly lengthy but every part earns its place; no wasted sentences.

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 no output schema, the example output is helpful. Covers strategies, exclusions, and sample input. Minor gaps in error behavior and full return values, but adequate for complexity.

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% with descriptions. The description adds context by linking parameters to strategies (e.g., username/password for password form) and provides an example input, enhancing understanding beyond schema alone.

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 the purpose: 'Orchestrate login and persist Playwright storageState.' It lists multiple strategies and distinguishes the tool from sibling set_session_auth by explicitly forbidding use for restricted IdPs.

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?

Explicitly states when to use (various login methods) and when not to use (Google OAuth, social logins, Cloudflare bot walls), directing to set_session_auth and a user-message template.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Macioa/EasyPlaywrightMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server