Skip to main content
Glama

Create order

create_order
Idempotent

Buy Stars or Premium for a Telegram @username. pay='usdt' or 'gram' returns an invoice to pay from your TON wallet (address, amount, comment, TON Connect transaction); pay='wallet' spends Stars from the key owner's bot wallet and delivers at once. dry_run=true checks and prices without ordering. max_price refuses the order above that price, in the unit you pay in.

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": {
      "product": "<product>",
      "quantity": "<quantity>",
      "recipient": "<recipient>",
      "pay": "<pay>",
      "idempotency_key": "<idempotency_key>"
    },
    "name": "create_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
payYes
dry_runNo
productYesstars or premium
quantityYesStars for 'stars' (50 and up); months for 'premium' (3, 6 or 12).
max_priceNoOptional ceiling in USDT, GRAM or Stars.
recipientYesThe Telegram @username that receives it (a person's public username).
payer_addressNoYour TON wallet address: lets a USDT invoice come with a ready transaction.
idempotency_keyYesYour unique id for this request; reuse it when retrying the same request.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare it is a non-read-only, non-destructive, idempotent, open-world operation, so the description's job is to add context, and it does: it discloses the two distinct fulfillment paths (invoice vs. instant wallet spend) and that max_price causes an outright refusal above the ceiling. It stops short of describing failure modes, invoice expiry, or what happens if the idempotency key is reused with different parameters.

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?

Four sentences, front-loaded with the purpose and payment-mode split, with zero filler. It is dense — the parenthetical transaction-field list and the trailing max_price sentence pack a lot in — but every clause carries operational meaning.

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 an 8-parameter, 5-required mutation tool with no output schema, the description covers the critical unknowns: how each payment mode behaves and what the caller gets back on the invoice path, plus the dry-run escape hatch. It would be stronger if it said what the response contains on the wallet path (order id/status) and whether invoices expire.

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 75%, and the description meaningfully deepens two parameters the schema only lists: the 'pay' enum is explained in terms of what the caller receives (address, amount, comment, TON Connect transaction) versus an immediate wallet spend, and max_price is clarified as a refusal threshold denominated in the payment unit. The remaining parameters (recipient, payer_address, idempotency_key) are already well documented in the schema, so no further compensation is needed.

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 first sentence gives a concrete verb and resource — 'Buy Stars or Premium for a Telegram @username' — which is far more specific than the title 'Create order'. It does not, however, differentiate itself from the sibling send_stars, which an agent could plausibly confuse with this purchase path.

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?

The description clearly routes between payment modes: usdt/gram produce an invoice to pay externally, wallet spends from the bot wallet and delivers immediately, and dry_run prices without ordering. What is missing is explicit exclusions — it never says to call check_recipient or get_prices first, nor when to prefer send_stars.

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