Skip to main content
Glama

create_purchase

Destructive

Requires owner auth (OAuth or begin_agent_link). Without it refuse and start 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 / sayToUserRu and open recovery.openUrl (VPN) plus recovery.openUrlRu (без VPN). 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. Dates show when Glama detected each change.

  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.7/5.0
Behavior5/5

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

Annotations only declare destructiveHint=true and readOnlyHint=false; the description adds extensive behavioral context beyond that: refusal behavior without auth ('refuse and start connect — do not pretend the order went through'), debit semantics (awaiting_review does NOT debit), failure recovery shape (userMessageRu/sayToUserRu plus recovery.openUrl and openUrlRu), server-side enforcement even when review is off (allowlist, catalog prices, limits, HITL, freeze, clarify gate), and response hints (paid + payment.status). No statement contradicts 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.

Conciseness3/5

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

Every sentence carries behavioral weight — there is no fluff — but the text is a single unbroken paragraph mixing hard constraints, UI elicitation details (button label, do-not-ask-yes/no), branch conditions, and negative rules with no structural hierarchy. The core purpose statement sits at sentence 3 instead of the lead, and the sessionId guidance partially duplicates the schema's own description. Dense but poorly organized; it would parse far better with grouped sections.

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 10-parameter, nested-object tool with no output schema, this is remarkably complete: auth flow, elicitation UI behavior, test mode, lucky branch, clarify gate, review flow, failure recovery, server-side enforcement, and response field hints (paid + payment.status) are all covered. Given annotations already flag destructiveness, an agent has everything needed to invoke correctly and predict consequences.

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 description coverage is 40% (lucky, sessionId, choice_set_id, clarification have schema text). The description compensates meaningfully for the low coverage: lucky is tied to allowLuckyPurchases and luckyPurchaseMaxCoins, choice_set_id/clarification are tied to the NEED_CLARIFICATION consequence, and sessionId reuse is explained. However, the remaining 60% of parameters (items subfields, explanation, idempotency_key, category) receive no description-level semantics beyond the schema's bare names.

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 states the core function explicitly: 'Propose or place an order in an allowlisted store using AgentPay coins.' This is a specific verb+resource pair that separates it from siblings like create_topup_intent (adding coins), present_choices (showing options), and request_user_confirmation (asking a question). The two-mode behavior (propose via elicitation vs. place directly) is disclosed, removing ambiguity about what invocation accomplishes. Minor flaw: the purpose sentence appears third, after auth and refusal rules, so it is not front-loaded, but it is unambiguous.

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 explicitly conditions invocation on many states: testMode (spend only gray test coins), get_spending_policy.allowLuckyPurchases (pass lucky:true), clearifyHint required (pass choiceSetId or clarifiation or the server returns NEED_CLARIFICATION), review enabled (status awaiting_review, show photos, owner confirms in cabinet), and existing sessionId (pass it and retru, never begin_agent_link again). It also gives hard when-not rules: 'Never send userID', 'Never ask for a bank card', 'Never change limits, freeze, autotopup, allowlist'. This goes far beyond clear context and includes explicit exclusions.

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.

TDQS

A4.4/5.0
Disambiguation4/5

Most tools target a distinct resource or action—get_* tools for financial/status lookups, search/get_product for catalog access, create_purchase for buying—but a few pairs share triggers. peek_stores and search_products can be triggered by the same phrases, and get_faq vs get_recovery_guide both address failure/error explanations, relying on the long descriptions to differentiate them.

Naming Consistency5/5

Tool names follow a consistent verb_noun snake_case pattern: get_* for read operations, create_/save_/update_/set_ for mutations, list_* for collection queries, and begin_/poll_/verify_ for the connection flow. No mixed casing or arbitrary verb variance is present.

Tool Count3/5

26 tools is on the heavy side, especially for a payment/shopping MCP server. While the domain is broad—auth, wallet, catalog, preferences, policies, purchases, recovery—some tools could be consolidated (e.g., peek_stores/search_products, get_faq/get_recovery_guide) without losing clarity.

Completeness4/5

The tool surface covers the full shopping/payment lifecycle: discovery, search, comparison, purchase, payment status, top-up, balance, limits, spending policy, address management, and connection recovery. Minor gaps exist—no explicit refund/cancel purchase tool and no preference deletion—but these can be worked around or are intentionally absent.