Skip to main content
Glama

MyOTP.App

Send OTP

generate_otp

Send a one-time password (OTP) to a phone number via SMS, WhatsApp, or Telegram. MyOTP.App generates the code, formats the message, picks the best carrier route, and delivers it. Returns a message_id (UUID) — keep it; you'll pass it to verify_otp, check_otp_status, or extend_otp later. Each call deducts credits from the account balance; the per-message cost varies by destination country and channel and is returned in the cost field. Use this whenever an app needs to verify someone's phone — signup, login 2FA, password reset, transaction confirmation, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
brandNoSender brand name shown to the recipient (3-16 alphanumeric characters plus dots). Defaults to the brand registered against the API key, or 'MyOTP.App' if none.
channelNoDelivery channel. 'sms' (default) works in 190+ countries. 'whatsapp' is best for India/Brazil/Indonesia/Mexico/Nigeria/Turkey. 'telegram' is best for privacy-focused users. Same API for all three.
otp_codeNoProvide your own pre-generated numeric OTP code (3-8 digits, 4-8 for telegram) instead of letting MyOTP generate one. Useful when you already have a code from another system.
force_sendNoIf true, send a new OTP even if one is already active for this phone number. By default the API returns 409 in that case. Use sparingly — repeated sends to the same number can hit carrier-level spam filters.
otp_lengthNoNumber of digits in the auto-generated OTP. Range 3-8 (4-8 for telegram). Default 6. Requires CUSTOM_OTP_LENGTH entitlement (Business plan or above).
return_otpNoIf true, the API response will include the generated OTP code in plain text. Useful for testing or when you want to deliver the OTP via your own channel. Defaults to false. SECURITY: never enable this in production user flows.
otp_validityNoHow long the OTP stays valid, in seconds. Range 30-14400 (30-3600 for telegram). Default 300 (5 minutes). Requires CUSTOM_OTP_EXPIRY entitlement (Business plan or above).
phone_numberYesDestination phone number in international format with NO leading + or 0. Must be 7-15 digits and start with a non-zero digit. Example: '14155551234' for a US number, '447911123456' for a UK number.
template_orderNoPick a specific message template by its order number (1-99). WhatsApp has four: 12 (English, 5-minute code), 13 (English, 10 minutes), 14 (Spanish es_MX, 5 minutes), 15 (Spanish es_MX, 10 minutes). On WhatsApp the template's own expiry overrides otp_validity. Requires the ACCESS_TO_TEMPLATES entitlement (Business plan and up). Not supported on telegram (Telegram generates its own message text).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
otpNoThe OTP value, present only when return_otp was true.
costYesCredits charged for this send.
statusYesAlways 'accepted' on success; delivery state comes from check_otp_status.
messageYesMessage describing the status of the request.
date_sentYesISO 8601 date-time the OTP was sent.
expires_atYesISO 8601 date-time the OTP expires.
message_idYesID of the message sent. Pass it to verify_otp, check_otp_status and extend_otp.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / template_order / description
      Previous value: -"Pick a specific message template by its order number (1-99). Requires ACCESS_TO_TEMPLATES entitlement. Not supported on telegram (Telegram generates its own message text)."New value: +"Pick a specific message template by its order number (1-99). WhatsApp has four: 12 (English, 5-minute code), 13 (English, 10 minutes), 14 (Spanish es_MX, 5 minutes), 15 (Spanish es_MX, 10 minutes). On WhatsApp the template's own expiry overrides otp_validity. Requires the ACCESS_TO_TEMPLATES entitlement (Business plan and up). Not supported on telegram (Telegram generates its own message text)."
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations indicate this is a non-read-only, non-idempotent action, and the description explicitly notes that each call deducts credits and returns the cost. It also mentions the 409 conflict on duplicate sends and the behavioral impact of force_send. This adds significant value beyond the annotations.

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?

The description is reasonably concise but carries a lot of key information in the first few sentences. It front-loads the purpose and return value, then gives usage guidance. It is not overlong given the complexity, but could be slightly trimmed without losing value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (9 parameters, output schema, entitlements), the description covers the core actions, return value, and high-level constraints. It doesn't enumerate every entitlement or channel nuance, but the schema and output schema provide that detail. Some gaps remain (e.g., exact cost calculation), but overall it's complete enough.

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 descriptions are thorough, but the overall description adds meaning by explaining how parameters interact, e.g., otp_length requiring an entitlement, template_order overriding otp_validity on WhatsApp. This helps the agent understand the constraints beyond basic schema types.

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?

The description clearly states the tool sends a one-time password via multiple channels and identifies the core use cases (signup, 2FA, password reset). It differentiates from siblings by mentioning the returned message_id used by related tools. The verb 'send' and resource 'OTP' are explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use the tool ('whenever an app needs to verify someone's phone') and provides context for when not to use it (e.g., avoiding repeated sends that trigger spam filters). It also references sibling tools (verify_otp, check_otp_status, extend_otp) for follow-up actions.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.