Skip to main content
Glama

Check a verification code

check_otp
Destructive

Verify a code sent with send_otp and consume it, so it can never be used twice. A wrong or expired code answers 400 OTP_INVALID. It is deliberately an error, not a verified: false, so a missing check at the caller can never read as success. Five wrong guesses kill the code. Free.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "to": "<to>",
      "code": "<code>"
    },
    "name": "check_otp"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesRecipient: a phone number in international format (+5511988887777) or a WhatsApp address (5511988887777@s.whatsapp.net, an @lid contact, or a @g.us group).
codeYesThe code the user typed.
idempotencyKeyNoYour own unique id for this call, such as a UUID. If the call fails with no answer, call again with the same key: it runs once, and the retry gets the first answer back. Answers are kept for 24 hours.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, and the description substantially extends that: a successful check permanently burns the code, a wrong/expired code returns HTTP 400 with OTP_INVALID, the failure is deliberately an error rather than a success-shaped object, and five wrong attempts invalidate the code. It even discloses the call is free, which no annotation conveys.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four tight sentences, each contributing distinct information: the action, the error contract, the reasoning behind the error contract, and the lockout cost. No filler and no restating of the title.

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?

For a mutation tool with no output schema, the description covers the failure modes, the lockout threshold, and cost, which is most of what an agent needs. What it omits is the success shape (what a valid check returns), leaving the agent to infer the happy-path response.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so 'to', 'code', and 'idempotencyKey' are already fully documented in the input schema. The description adds no parameter-level detail beyond mentioning 'code' implicitly, so the baseline 3 applies.

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?

Opens with a specific verb+resource and scope: verify a code issued by send_otp and consume it. The single-use semantics immediately separate it from the sibling send_otp, which produces codes rather than checking them.

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

Usage Guidelines4/5

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

Explicitly ties the tool to send_otp, so an agent knows the prerequisite and the flow. It does not spell out when *not* to call it (e.g. no code pending) or name an alternative verification path, so it falls short of a full 5.

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.

Resources