Key Takeaways
- This MCP error-handling page is example agent prompt copy. The classification essay is the in-depth sibling.
- REST wrapper, not a first-party Cursor or Claude plugin. No MCP server source here.
- Instruct the model to classify HTTP vs device vs voucher vs DLR — then stop.
- Never “retry until delivered” on OTP.
- Live error fields live in Developer Center.
- You bring the Android and operator credit. We meter devices and send volume.
Prompt text, not the taxonomy essay
MCP error handling for failed SMS — example agent prompt is the system message you give the host. The families (HTTP, radio, voucher, DLR, policy) live on the in-depth MCP error-handling guide. Do not clone it. Overview: MCP server overview.
If the prompt says “just try again,” you taught the model to empty prepaid.
SYSTEM
Classify. Do not invent a second send.█
Example agent prompt
“When a send tool fails, name the family: transport (timeout/401/429), device (offline/OEM), voucher or plan pause, DLR reject, or policy (unsigned webhook / bulk without approval). Tell the user in one sentence. Do not call send_sms again for OTP. Do not invent phone numbers. Do not print secrets.” Confirm live error shapes in Developer Center.
What the model should say back
| Family | User-facing line | Forbidden next step |
|---|---|---|
| 429 / timeout | Backoff; gateway busy or radio slow | Forge a new OTP |
| Device offline | Check pairing / power | Guess another device id |
| Allowance pause | Free/Developer cap; upgrade path | Loop send_sms |
| DLR fail | Operator/radio reject; see DLR | Assume undelivered = resend login code |
DLR product page: SMS delivery reports.
OTP line in the prompt
Put it in writing: authentication tools fail closed. Cooldown stays with your app, not the model. Transcripts must not contain OTP bodies.
Cost
You bring the Android and operator SMS credit. Prompt-driven retries still meter volume. Free: 1 device / 300 SMS lifetime / 300 contacts. See device and SMS volume pricing.
Checklist
- In-depth sibling linked, not rewritten.
- No first-party plugin claim.
- Classify-then-stop in the prompt.
- OTP retry forbidden in the prompt.
- No MCP implementation dump.
- Developer Center for live errors.
- Human escalate for voucher/pause.
- Secrets never echoed.
Next steps
Pace and 429 behavior: rate limits and safety prompt.
Related product pages
Jump to the live product docs for this topic—not another long-form article.
- SMS API documentationLive endpoint reference
- device and SMS volume pricingPlans and allowances
- Android SMS gateway product guideDefinition, product, and how to buy
- download the Android gateway appGet the APK





