Skip to main content
Glama

Totp

totp
Read-onlyIdempotent

TOTP / HOTP two-factor codes (RFC 6238 / 4226), compatible with Google Authenticator, Authy, 1Password and pyotp: generate the current code (plus previous / next and seconds remaining), verify a code with a drift window, create a new base32 secret with its otpauth:// URI for QR enrolment, or parse an otpauth URI. SHA1 / SHA256 / SHA512, 6–8 digits, any period; set time for reproducible results or counter for HOTP. POST so secrets never appear in URLs; secrets are not stored. Price: $0.001 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/totp

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "totp"
  }
}

Input Schema

NameRequiredDescriptionDefault
uriNoparse-uri: otpauth://totp/... or otpauth://hotp/...
codeNoverify: the code to check
modeNogenerate
timeNoUnix time (default: now)
bytesNonew-secret: secret length in bytes
digitsNo
issuerNo
periodNo
secretNoBase32 shared secret (spaces / lowercase OK)
windowNoverify: steps accepted either side
accountNoAccount label for the otpauth URI, e.g. alice@example.com
counterNoHOTP counter (switches to HOTP)
algorithmNoSHA1

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Goes well past the annotations: it discloses that codes come with previous/next and seconds-remaining, that verification uses a drift window, that supported algorithms/digits/periods are configurable, that HTTPS POST is used so secrets never appear in URLs, that secrets are not stored, and that each successful call costs $0.001 USDC via x402 on Solana. The 'not stored' note also reconciles the seemingly write-like 'create a new secret' with readOnlyHint=true.

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?

Front-loads the core capability and then layers modes, options, security note, pricing and the HTTP mirror. Dense but almost every clause carries information; the x402 pricing and alternate endpoint sentences are useful rather than filler, though the block is long for a single paragraph.

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?

For a 13-parameter, no-output-schema tool it covers the important ground: return shape (current plus previous/next code and seconds remaining), transport/security, payment model, and mode semantics. The missing piece is a per-mode required-input summary (verify → code + secret, parse-uri → uri), which would remove the last ambiguity.

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?

Adds meaning beyond the 62%-covered schema: time is framed as 'set time for reproducible results', counter as the switch that 'turns on HOTP', and window as the accepted drift steps on verify. Issuer/account are tied to the otpauth URI and enumerate the algorithm/period/digit space. It does not say which parameters each mode actually consumes, which is the remaining gap.

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?

Names the concrete resource (TOTP/HOTP codes per RFC 6238/4226) and enumerates the four distinct operations: generate current code, verify with drift, mint a new base32 secret, parse an otpauth URI. An agent can tell exactly what the tool does without opening the schema, and it is clearly unlike any of the numeric/string siblings.

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 effectively maps each mode to its purpose ('generate the current code', 'verify a code with a drift window', 'create a new base32 secret... for QR enrolment', 'parse an otpauth URI'), which tells the agent which branch to pick. It does not state exclusions or prerequisites per mode (e.g. that verify needs both code and secret), so it stops short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources