Skip to main content
Glama

Buy DID

buy_did
Destructive

Purchase one or more DIDs by creating an Order. Pass the sku_id from search_coverage — this is the Stock Keeping Unit (SKU) UUID, NOT the group_id. The first (token-less) call charges nothing and returns a preview: DID group location and type, included channels, per-DID and total prices, balance impact and any DID-group service restrictions. All amounts are in USD. Confirming with the returned confirmation_token executes the purchase AND constitutes acceptance of the service restrictions shown in the preview. Charges the customer's balance, creates an Order and returns the purchased DID ids and numbers. Occasionally some numbers are allocated asynchronously — when the response carries a note about pending DIDs, tell the user and check list_dids after a minute or later. When the response contains a registration_required block the numbers need end-user registration before they work — follow its next_steps instead of stopping at the purchase. An out-of-stock purchase is accepted by default as a back-order (the preview warns about it): the order is charged now and the missing numbers are provisioned later. Pass allow_back_ordering false to refuse instead. This spends real money.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qtyNoQuantity of DIDs to purchase (default 1).
sku_idYesThe `sku_id` field from search_coverage (a Stock Keeping Unit UUID, not group_id).
descriptionNoFree-text description set on every purchased DID (back-ordered ones too), overriding the DID configuration profile's. Omit to keep the profile's.
confirmation_tokenNoLeave empty on the first call — it returns a preview + confirmation_token and charges nothing; re-call with the token to execute the purchase.
allow_back_orderingNoDefault true (same as a User Panel order): when the group has no (or not enough) DIDs in stock the order is still accepted and charged, and the missing numbers are provisioned later — they appear in list_dids once assigned, and a pending order can be canceled if the customer prefers not to wait. Set false to reject an out-of-stock purchase instead.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, but the description adds substantial context beyond them: the token-less call charges nothing, confirmation executes the purchase and constitutes acceptance of restrictions, the balance is charged, out-of-stock defaults to a charged back-order, and async allocation/registration cases are spelled out. 'This spends real money' is a clear final warning.

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?

Front-loaded with purpose, then layered edge cases in a logical order, closing on the money warning. Long but every sentence carries distinct behavioral information an agent needs before spending funds.

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?

No output schema, yet the description previews the return shape (location/type, channels, prices, balance impact, restrictions, confirmation_token, purchased ids/numbers) and covers the async and registration branches. Nothing essential to correct invocation is missing.

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 baseline is 3, but the description adds genuine cross-field meaning: it warns sku_id is the SKU UUID and NOT group_id, explains confirmation_token as empty-then-execute, and clarifies allow_back_ordering's default semantics. It stops short of restating qty/description, which the schema already covers.

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 precise verb+resource: 'Purchase one or more DIDs by creating an Order.' This distinguishes it cleanly from siblings like buy_capacity_channels and from read tools such as get_did/search_coverage.

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?

Explicitly routes the agent to search_coverage for the sku_id, prescribes the two-step token flow, and states when to act on pending DIDs (tell user, then list_dids) and registration_required (follow next_steps). It also names the condition for passing allow_back_ordering=false.

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