Skip to main content
Glama

get_wallet_and_otp

Create a wallet for your email or get an OTP by email to manage funds and verify transactions.

Instructions

Create a wallet for your email or get otp by email

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYesEmail that will be associated with the wallet. This email can claim the funds on the wallet.

Implementation Reference

  • The core handler function implementing the logic for 'get_wallet_and_otp' tool. Creates or retrieves API key for the email via API call and handles session auth.
    export async function get_wallet_and_api_key(args: any) { const { email } = args; const resp: any = await fetch(BASE + '/api/getOrCreateApiKey/' + email); const res = await resp.json(); const apiKey = res?.API_KEY ?? null; if (res?.error) { return { content: [{ type: 'text', text: res?.error }], is_error: true, structuredContent: resp, }; } if (!apiKey) { return { content: [{ type: 'text', text: `API_KEY has been sent by email` }], ok: true, structuredContent: res, }; } setSessionAuth({ ok: true, APIKEY: apiKey, scopes: ['*'], }); //ctx.auth = getSessionAuth(); const resF = { result: 'Account created successfully', email, APIKEY: apiKey } return resF; }
  • Zod schema defining the input for the tool: requires an email.
    export const CreateAccountInput = { email: z.string().email().describe("Email that will be associated with the wallet. This email can claim the funds on the wallet.") };
  • src/solution.ts:24-29 (registration)
    Registration of the tool in the tools[] array used for ListToolsRequest, including schema conversion.
    { name: "get_wallet_and_otp", description: get_wallet_and_api_key_title, inputSchema: jsonSchema(zodToJsonSchema(z.object(CreateAccountInput))).jsonSchema, annotations: { title: get_wallet_and_api_key_title, readOnlyHint: true } },
  • Dispatch case in the central CallToolRequestSchema handler that invokes the tool function.
    case "get_wallet_and_otp": result = await get_wallet_and_api_key(args); break;
  • Title description string used in tool annotations.
    export const get_wallet_and_api_key_title = 'Create a wallet for your email or get otp by email';

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/paracetamol951/P-Link-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server