Skip to main content
Glama

Generate a TOTP/HOTP one-time code

generate_totp
Read-onlyIdempotent

Compute RFC 4226/6238 one-time passcodes from a base32 secret. Supports 6/8 digits, SHA1/SHA256/SHA512, and custom periods.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
atNoUnix time in milliseconds; defaults to now
modeNototp
digitsNo
periodNoTOTP period in seconds
secretYesBase32 TOTP/HOTP secret
counterNoHOTP counter
algorithmNoSHA1

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
modeYes
digitsYes
periodYes
algorithmYes
secondsRemainingYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so the safety/determinism profile is covered. The description adds supporting context — the RFC standards and that output is computed from a secret rather than generated randomly — but says nothing about error behavior for invalid base32 secrets or how 'at' defaults interact with TOTP windows.

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?

Two tight sentences, front-loaded with the core verb+resource and the RFC anchors. Every clause carries information; nothing is wasted.

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?

An output schema exists, so return-value explanation is not the description's burden, and the description adequately frames the tool as a deterministic RFC-compliant computation. Only the mode/counter/at semantics are left thin for a 7-parameter crypto utility.

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 coverage is 57%, mid-range. The description reinforces secret (base32 source), digits (6/8), algorithm (SHA1/256/512) and period (custom periods), but omits mode (totp/hotp), counter, and at, which are only partially documented in the schema. It adds marginal value without fully compensating for the uncovered parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Compute) plus a specific resource (RFC 4226/6238 one-time passcodes) and the input source (base32 secret). This distinguishes it from siblings like generate_password/generate_uuid, which produce random values rather than deriving a deterministic code from a secret, though it does not name those alternatives explicitly.

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 description never states when to call this versus alternatives, nor any prerequisites or exclusions. It only lists capability options (digits, algorithms, periods), leaving the agent to infer that this is the tool for deriving OTPs from an existing secret.

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.