Generate a TOTP/HOTP one-time code
generate_totpCompute RFC 4226/6238 one-time passcodes from a base32 secret. Supports 6/8 digits, SHA1/SHA256/SHA512, and custom periods.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"secret": "<secret>"
},
"name": "generate_totp"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | No | Unix time in milliseconds; defaults to now | |
| mode | No | totp | |
| digits | No | ||
| period | No | TOTP period in seconds | |
| secret | Yes | Base32 TOTP/HOTP secret | |
| counter | No | HOTP counter | |
| algorithm | No | SHA1 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| mode | Yes | ||
| digits | Yes | ||
| period | Yes | ||
| algorithm | Yes | ||
| secondsRemaining | Yes |