Skip to main content
Glama

Check a verification code

check_verification

Check the code the human typed, for the number the code was sent to. The result is the verification only when it is approved; every other outcome is a tool error with an error.code. Let the user in only when a check answers 200 with status approved; treat every other answer, a timeout and a network error as not approved.

Errors: incorrect_code (attempts remain), too_many_attempts (start a new verification), recipient_mismatch (to is not the number the code was sent to), verification_expired, verification_closed (already approved or replaced), verification_not_found. A wrong code costs an attempt, and five close the verification: do not retry a check by yourself; ask the human for the code again.

Input Schema

NameRequiredDescriptionDefault
toYesThe number the code was sent to, which your application is about to mark as verified.
codeYesThe six digits the human typed, as a string.
api_keyNoAn sk_test_ key, for example from create_test_key. Leave it out to use the key in this MCP server's Authorization header. A live key (sk_live_) is refused here: tool arguments are kept in the conversation, so a live key belongs in the header.
verification_idYesThe verification `id` from start_verification (ver_…).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only say it is non-read-only, non-idempotent and non-destructive. The description adds substantial behavior the annotations cannot carry: the five-attempt budget that closes a verification, the fact a wrong code costs an attempt, and a full error taxonomy with meanings (recipient_mismatch, verification_closed, verification_expired, etc.).

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?

Front-loaded with the action, then outcome semantics, then the error list — a sensible order. It is slightly redundant, stating the 'approved only, everything else is not approved' rule twice in adjacent sentences, but nothing is filler.

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

Completeness5/5

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

There is no output schema, so the description must carry return semantics, and it does: the success signal (200/approved) and every error code with its meaning and required follow-up. An agent has everything needed to call it and interpret the result.

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 all four parameters are already documented, including the api_key convention and the `to` pattern. The description adds flow context around `to` (it must match the number the code was sent to, else recipient_mismatch) but no format or syntax beyond the schema, 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?

The description states a specific verb and resource — checking the code the human typed against the number it was sent to — and frames the outcome (verification only on approval). An agent can distinguish this from start_verification, which creates verifications 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 Guidelines5/5

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

It gives explicit decision rules: only admit the user on a 200/approved result, treat every other answer, timeout and network error as not approved, never self-retry, and ask the human for a new code. The `too_many_attempts` branch even points to starting a new verification as the alternative path.

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