Skip to main content
Glama

Enter a 2FA code without seeing it

submit_2fa_code

Complete two-factor authentication by prompting a human to enter the one-time code on a secure localhost page; the server submits it and returns status without exposing the code to the AI.

Instructions

Complete a two-factor challenge raised by authenticate_login, without the AI ever seeing the code. The human types the current one-time code into a localhost secure page; the server fills the auto-detected code field, submits, and returns ONLY a status: success (then manage_session action=save), error, or unknown. Acts on the page authenticate_login left behind and never navigates. Blocks until answered or 180s elapse.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceNo"prompt" (default) asks the human; "totp" generates it from the seed in the vault (unattended). The AI never sees the code.prompt
profileNoShort name for the account, e.g. "github". Not a secret — it labels the secure prompt and selects a stored credential.
codeSelectorNoSelector for the one-time-code input. Auto-detected when omitted; pass it explicitly if the page state came back unknown.
submitSelectorNoSelector for the submit button. Auto-detected when omitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.29.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden, and it is exceptionally transparent. It discloses that the AI never sees the code, the human enters it on a localhost page, the server fills the field, the tool never navigates, and it blocks until answered or 180s elapse. It also clarifies the only return values: success, error, or unknown.

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 compact and front-loaded: the core purpose and safety guarantee come first, followed by the mechanism, return contract, and timing constraint. Every sentence adds necessary information without redundancy or filler.

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

Completeness5/5

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

Even though there is no output schema, the description explicitly defines the return statuses and the follow-up action ('success (then manage_session action=save)'). It also covers the precondition, timeout, no-navigation guarantee, and selector auto-detection, providing everything an agent needs to invoke the tool correctly.

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 100%, so the baseline is 3 and the schema already documents source, profile, codeSelector, and submitSelector. The description adds only a small amount of parameter-related context, such as auto-detection of selectors and that codeSelector can be passed when page state is unknown, but it does not materially exceed the schema.

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 specific verb and resource: 'Complete a two-factor challenge raised by authenticate_login, without the AI ever seeing the code.' It clearly distinguishes itself from the sibling auth flow by emphasizing the human-entered code is never exposed to the AI, and it adds concrete scope ('Acts on the page authenticate_login left behind and never navigates').

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 description clearly situates this tool in the auth sequence: it completes a challenge raised by authenticate_login and acts on the page that tool left behind. It also states the blocking behavior and 180-second timeout. It does not explicitly name alternatives or exclusion cases, but the sequential context makes usage unambiguous.

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