Skip to main content
Glama

get_purchase_status

Read-only

Get purchase status by id. Returns paid (boolean) and payment.status (succeeded/pending/failed). Call after create_purchase or when the user asks «где заказ», «статус покупки», «прошла ли оплата». If you do not have purchase_id, call list_purchases first. If pending, wait. If failed, do not retry payment. Chat «ок» is not proof of payment. 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
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).
purchase_idYes

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 / 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"
      -}
    • removedInput schema / properties / wait_seconds
      Removed value: -{
      -  "description": "Optional 5–120. Server waits while owner confirms in cabinet.",
      -  "type": "number"
      -}
  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.9/5.0
Behavior5/5

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

Annotations already mark the call read-only and non-destructive, and the description adds substantial behavioral guidance: pending means wait, failed should not be retried, chat acknowledgement is not proof of payment, and agent-link sessionId should be reused without re-running begin_agent_link. No annotation contradiction.

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

Conciseness5/5

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

The description is dense but every sentence earns its place: purpose and return format first, then usage triggers, then edge-case and authentication rules. There is no filler or tautology.

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?

Completes the picture despite a modest schema: return fields, trigger conditions, missing-id fallback, pending/failed handling, and auth/sessionId behavior are all present. An agent has everything needed to call this tool correctly.

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 covers sessionId in detail but leaves purchase_id undocumented, so the description compensates by tying purchase_id to list_purchases and to the post-create_purchase context. It also explains when to pass sessionId and warns against inventing one. Slightly generic on purchase_id format but adequate.

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?

States a specific action—get purchase status by ID—and names the returned fields (paid boolean and payment.status). This is clearly distinct from sibling tools like get_payment_status because it is anchored to purchases and includes a concrete return shape.

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?

Gives explicit triggers: call after create_purchase or when the user asks about order/payment/purchase status. It also prescribes the fallback of calling list_purchases first when purchase_id is missing, and tells the agent what to do for pending and failed outcomes.

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.