Skip to main content
Glama

create_purchase

Destructive

Requires the owner's connection: if there is no session, call begin_agent_link and poll_agent_link first. Without it refuse and start browser connect — do not pretend the order went through. Propose or place an order in an allowlisted store using AgentPay coins. Cursor/Claude Code with MCP elicitation: server shows a button «Оформить · N коинов» — do NOT ask «да/нет» in chat; the button is the owner's payment approval for orders above confirmAbove. Without elicitation the server falls back to awaiting_confirmation + cabinet/Telegram HITL. If testMode, spend only gray test coins in test stores. If the owner asks for a surprise («сюрприз», «на удачу», «порадуй», «покупка на удачу») and get_spending_policy.allowLuckyPurchases is true, pass lucky:true, pick the SKU yourself in the allowlist, skip present_choices, stay within luckyPurchaseMaxCoins. If clarifyHint required present_choices/ask_one and lucky is not set, you MUST pass choiceSetId (chosen) or clarification:{confirmed:true,answerSummary}. Otherwise server returns NEED_CLARIFICATION — do not grab the first SKU. If the owner enabled review on merchant site, this does NOT debit: status awaiting_review — you MUST show photos and product links (url/trackedUrl) and tell the owner to confirm in the AgentPay cabinet. On ANY failure the JSON has recovery: tell the owner userMessageRu and open recovery.openUrl. Never change limits, freeze, autotopup, allowlist (exception: set_test_mode). If review is off, server still enforces allowlist, catalog prices, limits, HITL, freeze, clarify gate. Response includes paid + payment.status. Never send userId. Never ask for a bank card. Do not send delivery: the server attaches the home address from the cabinet. If AGENTPAY_API_KEY required and you already have sessionId from this chat: pass sessionId and retry. Never begin_agent_link again. Never ask the owner to edit connector settings or reconnect. Never web-search.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes
luckyNotrue = surprise buy within luckyPurchaseMaxCoins; skip present_choices
amountYesTotal in coins
categoryNo
store_idYes
sessionIdNoOptional. Agent-link sessionId from begin_agent_link / poll_agent_link. Pass on every tool when connector has no Authorization Bearer (Grok/ChatGPT/Claude). After status=approved this authenticates as als_<sessionId>. Never invent a sessionId. Never ask the owner to open Authorization settings (Grok has none).
explanationNo
choice_set_idNoChoice set id after owner picked an option
clarificationNo
idempotency_keyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / sessionId
      Added value: +{
      +  "description": "Optional. Agent-link sessionId from begin_agent_link / poll_agent_link. Pass on every tool when connector has no Authorization Bearer (Grok/ChatGPT/Claude). After status=approved this authenticates as als_<sessionId>. Never invent a sessionId. Never ask the owner to open Authorization settings (Grok has none).",
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • removedInput schema / properties / delivery
      Removed value: -{
      -  "description": "Fulfillment choice only. method required for mixed stores. pickupPointId required when method=pickup; take nearest from list_stores.pickupPoints (nearest/rank), do not invent closer PVZ. Do not put city/street here.",
      -  "properties": {
      -    "method": {
      -      "description": "courier | pickup",
      -      "type": "string"
      -    },
      -    "pickupPointId": {
      -      "description": "PVZ id from store pickupPoints",
      -      "type": "string"
      -    }
      -  },
      -  "type": "object"
      -}
    • removedInput schema / properties / sessionId
      Removed value: -{
      -  "description": "Optional. Agent-link sessionId from begin_agent_link / poll_agent_link. Pass on every tool when connector has no Authorization Bearer (Grok/ChatGPT/Claude). After status=approved this authenticates as als_<sessionId>. Never invent a sessionId. Never ask the owner to open Authorization settings (Grok has none).",
      -  "type": "string"
      -}
  3. Changed1 schema field changed
    • changedInput schema / properties / sessionId / description
      Previous value: -"Optional. Agent-link sessionId from begin_agent_link / poll_agent_link. Pass on every tool when connector has no Authorization Bearer (Grok/ChatGPT/Claude). After status=approved this authenticates as als_<sessionId>. Never invent a sessionId. Never ask the owner to reconnect."New value: +"Optional. Agent-link sessionId from begin_agent_link / poll_agent_link. Pass on every tool when connector has no Authorization Bearer (Grok/ChatGPT/Claude). After status=approved this authenticates as als_<sessionId>. Never invent a sessionId. Never ask the owner to open Authorization settings (Grok has none)."
  4. Changed1 schema field changed
    • changedInput schema / properties / delivery / description
      Previous value: -"Fulfillment choice only. method required for mixed stores. pickupPointId required when method=pickup. Do not put city/street here."New value: +"Fulfillment choice only. method required for mixed stores. pickupPointId required when method=pickup; take nearest from list_stores.pickupPoints (nearest/rank), do not invent closer PVZ. Do not put city/street here."
  5. Changed1 schema field changed
    • addedInput schema / properties / delivery
      Added value: +{
      +  "description": "Fulfillment choice only. method required for mixed stores. pickupPointId required when method=pickup. Do not put city/street here.",
      +  "properties": {
      +    "method": {
      +      "description": "courier | pickup",
      +      "type": "string"
      +    },
      +    "pickupPointId": {
      +      "description": "PVZ id from store pickupPoints",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  6. Changed1 schema field changed
    • addedInput schema / properties / sessionId
      Added value: +{
      +  "description": "Optional. Agent-link sessionId from begin_agent_link / poll_agent_link. Pass on every tool when connector has no Authorization Bearer (Grok/ChatGPT/Claude). After status=approved this authenticates as als_<sessionId>. Never invent a sessionId. Never ask the owner to reconnect.",
      +  "type": "string"
      +}
  7. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, and the description goes well beyond that by disclosing session requirements, refusal behavior ('refuse and start browser connect'), non-debit review mode, failure recovery JSON, and response fields (paid + payment.status). It also lists explicit never-do actions and authentication handling, providing deep behavioral context beyond the structured annotations.

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

Conciseness2/5

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

The description is a single dense paragraph with many clauses, conditionals, and prohibitions, which makes it hard to scan. While most sentences carry important information, the lack of formatting, bullets, or separate sections hurts readability and quick comprehension. It is more exhaustive than concise.

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 a complex mutation tool with 10 parameters and no output schema, the description covers extensive ground: session flow, test mode, lucky purchases, clarify gate, review mode, failure recovery, and response fields. Yet it omits detailed semantics for core parameters like store_id, items, idempotency_key, and explanation, and does not specify the full success response shape, leaving it just short of fully complete.

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 only 40%, so the description must compensate. It adds meaning to lucky, sessionId, choice_set_id, and clarification, and explains SKU selection in lucky mode. However, it does not elaborate on store_id, amount, idempotency_key, items, or explanation, leaving some parameters to the sparse schema. Partial compensation for low coverage earns a 3.

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 clearly states 'Propose or place an order in an allowlisted store using AgentPay coins', providing a specific verb, resource, and payment mechanism. This distinguishes it from sibling tools like create_topup_intent or prepare_dixy_checkout. The added detail about session requirements and review mode reinforces the tool's core purpose without ambiguity.

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 description gives explicit when-to-use guidance: prerequisites (begin_agent_link/poll_agent_link), conditional flows for testMode, lucky purchases, clarifyHint, and review mode, plus clear prohibitions (never begin_agent_link again, never ask the owner to edit settings). It even references sibling tools like present_choices when explaining the clarify gate, leaving little room for incorrect invocation.

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.