Skip to main content
Glama

create_session

Create a new phone verification session. Returns deep_link, qr_code (base64 PNG), and qr_text (UTF-8 text QR for terminal display). Sessions provide a hosted verification flow with callbacks.

Agent usage: After creating a session, pass the response's deep_link to render_auth_link so the user can open or scan it. Never hand qr_text to a link renderer — it is that link already rendered as QR art. Print it verbatim inside a fenced code block only when a real terminal needs the QR. On sms the person texts a short code from the number being proven, as in SMS login: deep_link is an sms: link to our default number with the message pre-filled, so render it the same way, and also show sms_message (what they send) with the numbers in sms_dids (one per region, each with its own QR), because a person reading on a computer texts from their phone. They get no reply SMS. An SMS proof can still be revoked about a minute after the session completes, if the delayed spoof check finds the sender was not a real mobile line, so before relying on it check it with validate_proof. Then use wait_for_session to poll until the session reaches a terminal state (verified, failed, or expired).

The user does not see tool results — most clients fold them away, render_auth_link's output included. Before you wait or poll, put what the user must act on into your own reply text: the link itself (not a sentence announcing it), the SMS text and number, or a note to check their inbox.

ACCESS: needs a Proof account. Authenticate this client (Claude Code: /mcp → Authenticate), then call this tool again. start_login does NOT open this tool.

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": {
      "channel": "<channel>"
    },
    "name": "create_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
channelYesHow the person proves the number: telegram or whatsapp (the bot reads it from their account) or sms (they text a short code from it). No phone number is sent
contextNo
profile_idNoSub-account whose name and templates the bot uses; omitted: the key's sub-account, else the primary
client_metadataNoYour own key-value data, stored with the session

Output Schema

NameRequiredDescriptionDefault
idNoSession id
statusNo
channelNoHow the person proves the number: `telegram` or `whatsapp` (the bot reads the number from their account), or `sms` (they text a short code from the number to one of ours).
qr_codeNoBase64-encoded PNG QR code for `deep_link`
qr_textNoUTF-8 text QR for `deep_link`, for terminal/agent rendering
sms_codeNoThe short code the person texts (`sms` only)
sms_didsNoEvery number an `sms` session's code can be texted to, one per configured region (a region with no number is absent), each with its own QR code. `deep_link` uses the default region's number; the request comes from your server, so nothing in it says where the person is.
deep_linkNoOpens the messenger (`https://t.me/…`, `https://wa.me/…`) or the messaging app (`sms:<number>?body=…`) with what the person sends
expires_atNo
sms_messageNoThe message to send, as pre-filled in the links (`sms` only)
instructionsNoOne line telling the person what to do

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / profile_id / description
      Previous value: -"Sub-account (project) whose name and templates the bot uses; omitted: the key's project, else the primary"New value: +"Sub-account whose name and templates the bot uses; omitted: the key's sub-account, else the primary"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "channel": {
      +      "description": "How the person proves the number: `telegram` or `whatsapp` (the bot reads the number from their account), or `sms` (they text a short code from the number to one of ours)."
      +    },
      +    "deep_link": {
      +      "description": "Opens the messenger (`https://t.me/…`, `https://wa.me/…`) or the messaging app (`sms:<number>?body=…`) with what the person sends"
      +    },
      +    "expires_at": {},
      +    "id": {
      +      "description": "Session id"
      +    },
      +    "instructions": {
      +      "description": "One line telling the person what to do"
      +    },
      +    "qr_code": {
      +      "description": "Base64-encoded PNG QR code for `deep_link`"
      +    },
      +    "qr_text": {
      +      "description": "UTF-8 text QR for `deep_link`, for terminal/agent rendering"
      +    },
      +    "sms_code": {
      +      "description": "The short code the person texts (`sms` only)"
      +    },
      +    "sms_dids": {
      +      "description": "Every number an `sms` session's code can be texted to, one per configured region (a region with no number is absent), each with its own QR code. `deep_link` uses the default region's number; the request comes from your server, so nothing in it says where the person is."
      +    },
      +    "sms_message": {
      +      "description": "The message to send, as pre-filled in the links (`sms` only)"
      +    },
      +    "status": {}
      +  },
      +  "type": "object"
      +}
  2. Changed5 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / channel / description
      Previous value: -"Messenger the user opens; the bot reads their phone number from it, so none is sent"New value: +"How the person proves the number: telegram or whatsapp (the bot reads it from their account) or sms (they text a short code from it). No phone number is sent"
    • changedInput schema / properties / channel / enum
      Previous value: -[
      -  "telegram",
      -  "whatsapp"
      -]New value: +[
      +  "telegram",
      +  "whatsapp",
      +  "sms"
      +]
    • addedInput schema / properties / client_metadata / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • removedInput schema / properties / context / additionalProperties
      Removed value: -false
  3. Changed11 schema fields changed
    • removedInput schema / properties / callback_url
      Removed value: -{
      -  "description": "URL to redirect after verification",
      -  "type": "string"
      -}
    • changedInput schema / properties / channel / description
      Previous value: -"Verification channel"New value: +"Messenger the user opens; the bot reads their phone number from it, so none is sent"
    • changedInput schema / properties / channel / enum
      Previous value: -[
      -  "sms",
      -  "whatsapp",
      -  "telegram"
      -]New value: +[
      +  "telegram",
      +  "whatsapp"
      +]
    • addedInput schema / properties / client_metadata
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Your own key-value data, stored with the session",
      +  "type": "object"
      +}
    • addedInput schema / properties / context
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "action": {
      +      "description": "Picks the bot's wording: log in, 2FA, account recovery, or plain verification (the default)",
      +      "enum": [
      +        "login",
      +        "2fa",
      +        "verification",
      +        "recovery"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • removedInput schema / properties / external_user_id
      Removed value: -{
      -  "description": "Your application user ID",
      -  "type": "string"
      -}
    • removedInput schema / properties / metadata
      Removed value: -{
      -  "additionalProperties": {
      -    "type": "string"
      -  },
      -  "description": "Custom key-value metadata",
      -  "type": "object"
      -}
    • removedInput schema / properties / phone_number
      Removed value: -{
      -  "description": "Phone number in E.164 format",
      -  "type": "string"
      -}
    • addedInput schema / properties / profile_id
      Added value: +{
      +  "description": "Sub-account (project) whose name and templates the bot uses; omitted: the key's project, else the primary",
      +  "pattern": "^[0-9a-fA-F]{24}$",
      +  "type": "string"
      +}
    • removedInput schema / properties / template_id
      Removed value: -{
      -  "description": "Custom template ID",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "channel",
      -  "phone_number"
      -]New value: +[
      +  "channel"
      +]
  4. First observed

TDQS

A4.5/5.0
Behavior5/5

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

The description adds substantial behavior beyond the annotations: it explains the hosted flow, callback behavior, returned artifacts, SMS delivery semantics, revocation timing risk, and the need to authenticate before use. These details are important for a write/create tool and are not contradicted by 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.

Conciseness5/5

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

The description is long but appropriately structured for a complex tool: purpose and return values come first, followed by concrete agent usage and access requirements. The detailed SMS and QR guidance earns its place because mishandling those values would cause user-facing errors.

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?

Given the tool's complexity, output schema, and authentication requirements, the description is complete enough to support correct invocation. It covers creation, returned values, downstream tool usage, SMS caveats, polling, user-visibility issues, and access requirements.

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 already high at 75%, so the schema carries most parameter meaning. The description elaborates on the SMS channel flow and returned fields, but it does not add much semantic detail for context.action, profile_id, or client_metadata beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: creating a phone verification session, and it names the key returned values. It is clear on its own, but it does not explicitly distinguish this tool from nearby sibling creation tools such as create_verification, create_multi_channel_verification, or start_login.

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 Agent usage section explicitly tells the agent what to do after creation: pass deep_link to render_auth_link, never pass qr_text to a link renderer, show SMS details, validate SMS proofs, and poll with wait_for_session. It also gives clear when/when-not guidance for QR text and SMS handling, naming the relevant follow-up tools.

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.