Skip to main content
Glama

get_otp

Generates a TOTP code for a specified account using its ID or name, returning the code and seconds remaining until it changes.

Instructions

Generates a TOTP code for a specific account. REQUIRED: Provide either account_id OR account_name (at least one must be specified). Returns name, code, length and remainingSeconds, the seconds until the code changes: if you need a fresh code, wait that long instead of calling again. Errors: Returns 'No account found' if the name doesn't match any account. Returns 'Multiple accounts match' with a list of matches in the 'multipleMatches' field if the name is ambiguous - use the returned account_id to retry.

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": "get_otp"
  }
}

Input Schema

NameRequiredDescriptionDefault
account_idNoUUID of the account. Use this for exact matching, especially after resolving ambiguous name matches.
account_nameNoName or issuer domain to search for (case-insensitive partial match). If multiple accounts match, returns a list to choose from.

Output Schema

NameRequiredDescriptionDefault
codeNo
nameNo
errorNo
lengthYes
multipleMatchesNo
remainingSecondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.3

TDQS

A4.6/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden and does so: it discloses the return shape, the code-rotation timing, the exact error strings ("No account found", "Multiple accounts match"), and the multipleMatches field for recovery. That is behavior an agent cannot infer from the schema alone.

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-loaded with the action, then constraints, then return values, then error handling — a sensible ordering. It is dense but nearly every sentence carries operational value; the return-field enumeration is mildly redundant given the output schema exists.

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?

For a two-parameter read/generate tool, the definition covers the one-of constraint, return semantics, code expiry timing, and both failure modes with recovery instructions. Nothing an agent needs to call it correctly and handle errors is missing.

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 100%, so the baseline is 3; the description adds a real constraint the schema does not express — zero parameters are marked required, yet at least one of the two must be supplied. It also frames account_id as the exact-match/disambiguation path and account_name as a case-insensitive partial match.

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 ("Generates a TOTP code") scoped to "a specific account", which is immediately distinguishable from the account-management siblings (add_account, list_accounts, whoami). An agent knows exactly what this returns without opening the schema.

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?

Explicitly states the one-of requirement for account_id/account_name and gives a strong when-not-to-use rule: wait remainingSeconds for a fresh code instead of calling again. It also routes the agent on ambiguity (retry with the returned account_id). The only gap is that it doesn't advise when to prefer exact account_id over a name search up front, though the error path covers it.

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

Deploy Server

Other Tools