list_otp_tokens
View available OTP tokens to identify which ones can generate authentication codes for secure access.
Instructions
Returns the list of OTP tokens. Use this to understand which tokens are available before trying to generate code.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- otp_mcp/tool.py:71-81 (handler)The handler function for 'list_otp_tokens' tool. Decorated with @mcp.tool() for automatic registration in the MCP server. Lists all available OTP tokens with their IDs.@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 a tool with that name.@mcp.tool()