Skip to main content
Glama

auth_check

Detect if a page is behind a sign-in wall by reading the URL, title, and login controls. Use it after navigation or failed steps to distinguish expired sessions from agent errors, with optional [AUTH_REQUIRED] error on detection.

Instructions

Is the tab sitting on a sign-in wall? Reads the page (URL, title, password fields, sign-in controls) and returns { authRequired, confidence, signals }. Use it after a navigate, or whenever a step fails unexpectedly, to tell "the session expired" apart from "the agent got lost". Pass failOnAuthWall:true to get an [AUTH_REQUIRED] error instead of a verdict, so a harness can bucket the run as an auth failure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabIdNoTab id (default: active tab)
frameIdNoFrame id from frames_list
allFramesNoAct on the first match in ANY frame (the element may be in an iframe)
failOnAuthWallNoError with [AUTH_REQUIRED] if this lands on a sign-in wall (expired session)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.9.5
    • changedInput schema / properties / allFrames / description
      Previous value: -"Search every frame of the tab and act on the first that matches - use when a selector should match but does not (the element is in an iframe)"New value: +"Act on the first match in ANY frame (the element may be in an iframe)"
    • changedInput schema / properties / failOnAuthWall / description
      Previous value: -"Fail with [AUTH_REQUIRED] when the page this call lands on is a high-confidence sign-in wall (session expired). Off by default unless the server runs with --fail-on-auth-wall; snapshot still reports the verdict as `authWall` either way."New value: +"Error with [AUTH_REQUIRED] if this lands on a sign-in wall (expired session)"
    • changedInput schema / properties / frameId / description
      Previous value: -"Act inside this frame (ids come from frames_list)"New value: +"Frame id from frames_list"
    • changedInput schema / properties / tabId / description
      Previous value: -"Target tab id (defaults to the active tab)"New value: +"Tab id (default: active tab)"
  2. Addedv0.9.3

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral disclosure burden. It discloses that the tool reads the page, returns a verdict object with authRequired/confidence/signals, and that failOnAuthWall changes success into an [AUTH_REQUIRED] error. This is strong behavioral transparency, though it doesn't mention side effects or permissions, which are minor for a read-only diagnostic.

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?

Each of the three sentences earns its place: the purpose/return shape, the recommended invocation timing, and the fail-fast mode. The description is front-loaded and avoids redundant restatements of the name or schema.

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 there is no output schema, the description compensates by providing the return shape, use case, and error behavior. This is sufficient for an agent to select and invoke the tool correctly. A small gap is that the semantics of the 'signals' field and the behavior when authRequired is false are not expanded, but they are inferable from the context.

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 description coverage is 100%, so the baseline is 3. The description adds meaningful semantics for failOnAuthWall by explaining the error mode versus a normal verdict and the harness-bucketing purpose. It doesn't add detail for tabId/frameId/allFrames, but the schema already documents those adequately.

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 opens with a precise question and immediately states the behavior: reads page content (URL, title, password fields, sign-in controls) and returns an auth verdict. It clearly differentiates this from the sibling navigation and page-interaction tools by focusing on auth-wall detection.

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?

The tool gives explicit context for when to invoke it: after a navigate, or whenever a step fails unexpectedly, to distinguish expired sessions from navigation errors. It does not explicitly name alternatives or state when not to use it, but the guidance is clear enough for an agent to route reasonably.

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