Skip to main content
Glama
Upload-Post

Upload-Post

Official

Buy an Upload-Post phone number

purchase_phone_number
Idempotent

Buy a phone number for an Upload-Post profile by checking availability and price, accepting terms, and confirming the purchase; the number is billed monthly until released.

Instructions

Buy a phone number for a profile. It costs money: the monthly price, which varies by country and number type (1.5 times our carrier's monthly cost for that number, rounded up to the next whole unit, at least 3 and at most 30 (numbers that would cost more are not offered): e.g. a carrier cost of 2.40 gives 3.60, so 4 per month; 7.30 gives 10.95, so 11; in the account's billing currency, USD, EUR or GBP, the same amount in each; read the real price in phone_numbers_read search_available / countries, never assume one; no setup fee) is charged on the account's subscription at once, prorated, and then on every renewal until the number is released (annual plans pay 12 months). Usage (outbound SMS, forwarding, recording, transcription) is billed on the next invoice. Buying and the identity step take the account's API key or the owner's own session, never a profile JWT. Before calling: read phone_numbers_read config (can_purchase, terms_version, terms_url), pick the number with search_available, tell the user the price, and have them read and accept the terms at terms_url (no emergency calls, acceptable use, porting authorization, carrier data processing in the US). end_user is the person or business that will use the number, as our carrier needs it: type individual | business, first_name, last_name, business_name (business), phone (E.164), email, address { street_address, extended_address, locality, administrative_area, postal_code, country_code }. Spanish, German, French and Italian numbers need an address in that country (local numbers: in the area code's region). purchase_intent_id is your idempotency key (8-100 characters: letters, digits, _ - . :): make one up once per number you mean to buy and reuse it on every retry of that purchase; the same id never charges twice and returns the same number. Use a new id only to retry a purchase that failed. Answers: 200 status active (bought). 202 status kyc_required: nothing charged yet; the country needs identity documents: read phone_numbers_read kyc_fields, collect them from the user and call this tool again with the same arguments plus values and documents (then it is sent to POST /kyc). 202 pending_payment: paid, the order with our carrier is still being confirmed; it ends active (phone_number_activated webhook) or failed with the charge refunded, usually within about 15 minutes: check phone_numbers_read get and do not buy again (repeating the same purchase_intent_id returns the same number). 202 pending_regulatory: paid, our carrier is reviewing the identity; it turns active when approved, and a declined review is refunded (phone_number_declined webhook). Errors: 400 terms_not_accepted (send accept_terms: true and the current terms_version), phone_numbers_kyc_invalid, phone_numbers_country_not_available, phone_numbers_type_not_offered; 402 phone_numbers_paid_plan_required (relay upgrade_url) or phone_numbers_payment_failed; 403 phone_numbers_account_suspended; 404 profile_not_found; 409 purchase_velocity (one purchase every 10 minutes), phone_numbers_limit_reached (5 numbers per account by default), phone_number_unavailable (taken: search again), phone_numbers_currency_unsupported; 429 phone_numbers_rate_limited (honour Retry-After); 502 phone_numbers_carrier_error (the carrier refused the order, the charge was refunded); 503 phone_numbers_capacity. Countries in this first version: US, GB, ES, FR, DE, IT, MX, BR; types local, mobile, national (no toll-free). Team members acting on the owner's account cannot buy, send identity documents, release or read port-out details (403 phone_numbers_owner_only): only the owner or an Admin can. Paid plans only (an active subscription with at least one paid invoice; trials and the Free plan get 402 phone_numbers_paid_plan_required with an upgrade_url to relay). These numbers cannot make outbound calls and can NEVER call emergency services (112 / 911). US and Canadian numbers receive SMS but cannot send SMS yet (403 sms_registration_required); some Spanish, German and Italian numbers have no SMS at all. Not generally available yet: the API answers 403 phone_numbers_not_available until phone numbers are available for the account (phone_numbers_read config answers enabled: false). Needs the user's approval: call it first without confirmed to get a preview (nothing is sent), show the user exactly what will go out, and repeat the call with confirmed: true only after they approve.

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": {
      "profile_username": "<profile_username>",
      "country": "<country>",
      "number_type": "<number_type>",
      "purchase_intent_id": "<purchase_intent_id>",
      "end_user": "<end_user>",
      "accept_terms": "<accept_terms>",
      "terms_version": "<terms_version>"
    },
    "name": "purchase_phone_number"
  }
}

Input Schema

NameRequiredDescriptionDefault
valuesNoIdentity step only (after 202 kyc_required): { requirement_id: value } for the text and date requirements of kyc_fields.
countryYesISO country code, e.g. 'ES', 'GB', 'US'.
end_userYesWho will use the number, as the carrier requires it.
area_codeNoWithout phone_number: take the first available number in this area code.
confirmedNoSet to true only after the user has seen the preview this tool returns without it and approved it. Without it nothing is sent.
documentsNoIdentity step only (after 202 kyc_required): { requirement_id: { filename, content_base64 | path } } for the file requirements of kyc_fields (ID or passport, company certificate, proof of address under 3 months…).
number_typeYeslocal (default), mobile or national. No toll-free numbers.
accept_termsYestrue, only after the user has read and accepted the terms at `terms_url` (phone_numbers_read config).
phone_numberNoA number from phone_numbers_read search_available, in E.164. Omit to take the first available one.
terms_versionYesThe `terms_version` from phone_numbers_read config.
profile_usernameYesUpload-Post profile the number belongs to (from list_users).
purchase_intent_idYesIdempotency key for this purchase (8-100 characters: letters, digits, _ - . :). Reuse it on retries; a new one buys another number.

Output Schema

NameRequiredDescriptionDefault
resultNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.29.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only declare the operation is not read-only, is idempotent, and is open-world; the description goes far beyond that, disclosing that money is charged immediately and prorated, recurs on renewal, that usage is billed later, that identity/KYC steps may follow with nothing charged yet, and that refunds occur on carrier/regulatory failure. It also enumerates rate limits (one purchase per 10 minutes, Retry-After on 429) and capacity/ownership restrictions. Minor deduction: the preview/confirm contract is described but the exact preview payload contents are left implicit.

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

Conciseness3/5

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

Front-loaded with purpose and cost, which is correct, but the body is one sprawling block of semicolon-chained clauses with deeply nested parentheses, including a worked pricing example that could be deferred to the search tool. Nearly all content is substantive, yet the density makes it hard to scan and risks burying the mandatory preview-before-confirm instruction at the very end.

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?

For a 12-parameter, nested, money-moving, multi-outcome tool this covers what an agent actually needs: prerequisites, charging model, the 200/202 state machine (active, kyc_required, pending_payment, pending_regulatory) with recovery actions, the error-code catalogue, and hard constraints (no outbound calls, no emergency services, country/type list). Return values need not be explained here because an output schema exists.

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 coverage is 100%, so the baseline is 3, but the description adds real meaning: `purchase_intent_id` is explained as a never-double-charge idempotency key with a rule for when a new id is legitimate, `values`/`documents` are tied to the `kyc_fields` second-call flow, and `end_user` is framed as carrier-required identity data with country-matching rules. It does not, however, clarify `area_code` vs `phone_number` precedence or the `documents` size/format limits beyond what the schema already states.

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?

Opening sentence is a specific verb+resource+scope: 'Buy a phone number for a profile.' It also implicitly separates itself from the read-side sibling by directing config/search/price lookups to phone_numbers_read. An agent can tell this is the committing purchase step and not a search or release operation.

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?

Gives an explicit pre-call checklist (read config for can_purchase/terms_version/terms_url, pick the number with search_available, tell the user the price, obtain terms acceptance) and a mandatory two-phase invocation pattern: call without `confirmed` for a preview, then re-call with `confirmed: true` after user approval. It also states who may call it (owner or Admin only; profile JWT rejected) and which plans qualify (paid plans with a paid invoice).

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

Deploy Server

Other Tools