Skip to main content
Glama

create_purchase

Place an order in an allowlisted store using AgentPay coins, with support for lucky picks, clarification, and test-mode gray coins. Call when the user clearly wants to buy.

Instructions

Place an order in an allowlisted store using AgentPay coins. 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 in the allowlist, skip present_choices, stay within luckyPurchaseMaxCoins. If clarify required and lucky is not set, pass choice_set_id or clarification:{confirmed:true}. Otherwise NEED_CLARIFICATION — do not grab the first SKU. Do not send delivery: the server attaches the home address. On error read recovery. Never change limits/freeze/allowlist. Exception: set_test_mode. Call when the user clearly wants to buy («купи», «оформи», «потрать»). Always send idempotency_key, items[], store_id, amount. Never ask for a bank card.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes
luckyNo
amountYesTotal in coins
categoryNo
store_idYes
explanationNo
choice_set_idNo
clarificationNo
idempotency_keyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.3

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden. It discloses key behavioral traits: test-coin spending in testMode, lucky purchase rules, clarification handling, server-attached delivery, idempotency_key requirements, and error recovery ('On error read recovery'). It even states that the server attaches the home address, preventing a wrong assumption.

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?

The description is dense but every sentence delivers essential rules. It is one long paragraph with many conditional clauses, which could be easier to scan with bullet points, but given the tool's complexity, it stays efficient without fluff.

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?

The description covers the full invocation context: required parameters, conditional branches (lucky, clarification, testMode), prohibitions, error handling, and alternatives (skip present_choices). It even points to policy via get_spending_policy and recovery via get_recovery_guide, making it complete for an agent with access to siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 11%, but the description compensates extensively. It explains the required parameters (idempotency_key, items[], store_id, amount), the meaning of lucky:true, choice_set_id, clarification object, and the instruction to skip present_choices. It adds critical semantics for the trickiest parameters.

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 opens with a specific verb and resource: 'Place an order in an allowlisted store using AgentPay coins.' It also gives concrete invocation triggers ('Call when the user clearly wants to buy («купи», «оформи», «потрать»)'') and distinguishes its scope from sibling tools like get_balance or list_allowed_stores by focusing on the purchase action.

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?

It explicitly states when to call the tool (user clearly wants to buy) and provides detailed conditionals for testMode, lucky purchases, and clarification needs. It also tells the agent what not to do ('Never change limits/freeze/allowlist', 'Never ask for a bank card') and references sibling tools like get_spending_policy and present_choices to guide the decision flow.

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