Skip to main content
Glama

OTP code generator

totp
Read-only

Generate RFC 6238 one-time passwords from a base32 secret, verify submitted codes, or create a new secret and otpauth:// URI for authenticator setup.

Instructions

Generate TOTP codes (RFC 6238) from a base32 secret, optionally verify a code, or create a new secret with its otpauth:// URI. (Same as IT-Tools /otp-generator.)

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
codeNoCode to verify (accepts the previous/next window too)
digitsNo
issuerNoIT-Tools
periodNo
secretNoBase32 secret; omit to generate a new one
accountNouser
algorithmNosha1

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations declare readOnlyHint=true, openWorldHint=false and idempotentHint=false, so the safety profile is already covered, and the description usefully notes that it can mint a new secret (consistent with the non-idempotent hint). It adds nothing about return shape, error behavior for invalid base32, or what verification returns on failure, but with annotations present the bar is lower.

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?

One sentence, front-loaded with the primary function, listing the two secondary modes compactly with a source reference at the end. Nothing is wasted.

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?

For a 7-parameter tool with no output schema, the description covers the three operating modes adequately, but says nothing about the five configuration parameters (digits, period, algorithm, issuer, account), which are undocumented in the schema as well. An agent could invoke it but would have to guess at those knobs.

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 coverage is low (29%: only code and secret are described in the schema), so the description carries weight, and it does explain both of the parameters that the schema lacks descriptions for, the base32 secret input and the optional verification code. It adds no meaning for digits, period, algorithm, issuer, or account, which remain undocumented in both places.

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?

Specific verb and resource with three explicit modes: generate TOTP codes per RFC 6238, verify a code, or create a new secret with its otpauth:// URI. It does not differentiate itself from siblings like generate_token or hmac, but the purpose of this tool is unambiguous from the sentence alone.

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

Usage Guidelines3/5

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

Usage is only implied through mode hints ('optionally verify a code', 'omit to generate a new one' in the schema). There is no explicit statement of when to choose this over hmac, generate_token, or other sibling generators, and no preconditions are given.

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