list_otp_tokens
Retrieve the list of available OTP tokens to identify tokens that can be used for generating one-time passwords securely via the otp-mcp-server.
Instructions
Returns the list of OTP tokens. Use this to understand which tokens are available before trying to generate code.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"type": "object"
}
Implementation Reference
- otp_mcp/tool.py:71-82 (handler)The handler function for the list_otp_tokens tool, which lists all available OTP tokens by retrieving them from the database and formatting as a numbered list string. The @mcp.tool() decorator registers it as an MCP tool.@mcp.tool() async def list_otp_tokens() -> str: """ Returns the list of OTP tokens. Use this to understand which tokens are available before trying to generate code. """ db = get_token_db() tokens_list = db.get_tokens() if not tokens_list: return "No OTP tokens found." return "\n".join([f"{x.rowid}# {x}" for x in tokens_list])
- otp_mcp/tool.py:71-71 (registration)The @mcp.tool() decorator registers the list_otp_tokens function as an MCP tool.@mcp.tool()