Skip to main content
Glama

TOTP Code Generator

security_totp_generator

Generate the current TOTP two-factor code (RFC 6238) from a base32 secret — the same codes authenticator apps produce. Supports 6/8 digits, 30/60-second steps and SHA-1/256/512. Deterministic HMAC via Web Crypto; nothing is stored. Use this when an agent needs to rFC 6238 2FA codes from a base32 secret. x402 price $0.01/call (USDC, eip155:8453).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
algoYesAlgorithm
digitsYesDigits
periodYesPeriod (s)
secretYesBase32 secret

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full load. It usefully discloses determinism, that HMAC runs via Web Crypto, that 'nothing is stored' (stateless), and the x402 price of $0.01/call in USDC on eip155:8453 — real behavioral value. However it says nothing about failure behavior for an invalid base32 secret, or that the returned code is time-window-scoped and expires.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Core capabilities and the stateless/cost facts are front-loaded in the first three clauses, which is good. But the 'Use this when...' sentence is pure redundancy with a typo, and the pricing/meta detail is appended in the same breath, so the text is not fully earning its length.

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

Completeness3/5

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

With no annotations and no output schema, the description must cover the return contract, and it does not — an agent cannot tell from the text whether it receives a bare 6/8-digit string or a JSON object, nor how the time step remaining is reported. Statelessness and pricing are covered, so the gap is meaningful but not fatal for a simple one-shot generator.

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% and three of four params are enums, so the schema already conveys the allowed values. The description's '6/8 digits, 30/60-second steps and SHA-1/256/512' maps cleanly onto those enums but adds little beyond them, and 'base32 secret' duplicates the schema's own description. Baseline 3 is appropriate.

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?

States a specific verb and resource — generate a TOTP two-factor code — plus the RFC, the input encoding (base32 secret), and the analogy 'the same codes authenticator apps produce'. No sibling tool in the catalog does anything similar, so the agent can route to it unambiguously.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The only usage sentence, 'Use this when an agent needs to rFC 6238 2FA codes from a base32 secret', merely restates the first sentence (and contains a typo, 'rFC'). There is no when-not guidance, no mention of prerequisites (e.g. needing a provisioned shared secret), and no alternatives.

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