Skip to main content
Glama

list_purchases

Read-only

List the owner's recent AgentPay purchases (bought statuses only) with line items. Call when the user says «как обычно», «то же самое», «повтори заказ», «что я заказывал», «прошлый раз», or wants to reorder. Returns last plus purchases[]. Use last.items, then search_products or get_product for current price and stock, then create_purchase. If testMode, repeat spend uses gray test coins in test stores. Do not invent a past basket. Do not search the idiom as a product name. If usePastPurchases is false, history is empty. 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
limitNo1–20, default 10
storeIdNoOptional store UUID
categoryNoPreference category, e.g. grocery
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).

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. Changed1 schema field changed
    • 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
    • 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"
      +}
  5. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the read-only annotations, the description discloses output shape ('Returns last plus purchases[]'), test-mode behavior with gray test coins, the usePastPurchases edge case, authentication retry logic with sessionId, and explicit prohibitions around begin_agent_link and connector settings. This substantially exceeds what annotations alone provide.

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 and front-loaded with purpose and trigger phrases before diving into workflow and constraints. Most sentences earn their place, though the negative instructions overlap somewhat ('Never begin_agent_link again', 'Never ask the owner to edit connector settings or reconnect', 'Never web-search') and could be trimmed without losing 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 a tool with no output schema, the description gives a minimal return outline ('last plus purchases[]') and enough workflow context to proceed. It also covers test mode, empty-history edge case, and authentication retry. A more detailed return schema would make it fully complete, but the description handles the major gaps.

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 100%, so the input schema already documents limit, storeId, category, and sessionId fully. The description adds little parameter-specific meaning beyond what the schema says; the mention of sessionId mostly repeats the schema. It also references usePastPurchases, which is not a parameter in the input schema, creating slight ambiguity.

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-resource pair: 'List the owner's recent AgentPay purchases (bought statuses only) with line items.' It clearly distinguishes the tool from status-lookup and product-search siblings by emphasizing 'bought statuses only' and 'line items'. The trigger phrases further reinforce its scope.

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 gives explicit trigger phrases and the 'wants to reorder' condition, plus a concrete workflow: use last.items, then search_products/get_product, then create_purchase. It also provides when-not-to-do guidance such as 'Do not invent a past basket' and 'If usePastPurchases is false, history is empty.' It does not explicitly name a sibling for one-off purchase-status checks, so it stops short of a 5.

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.