Skip to main content
Glama

get_partner_purchase_context

Read-only

Get the owner's on-demand purchase history from a linked enterprise partner account. Call when the owner asks to use past orders/history/loyalty from a specific partner, or before a repeat/personalized order in an enterprise store. Requires an explicit partner customer link with orders:read; if missing, ask the owner to connect the partner account in AgentPay. Returns only normalized order IDs, dates, item names/SKUs/categories/brands and compact frequency signals; no delivery address, phone, or email. Use this context for product choice, then verify current price/stock with search_products or get_product before create_purchase. 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
storeIdYesEnterprise store UUID
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. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, but the description adds substantial behavioral context: it requires a partner customer link with orders:read, lists what data is and isn't returned (e.g., no address/phone/email), and describes the sessionId retry flow. It also aligns with openWorldHint=false by prohibiting web searches.

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, trigger conditions, authorization requirements, return scope, follow-up workflow, and error handling. It is front-loaded with the core purpose and usage.

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?

Despite having no output schema, the description tells the agent what to expect in the response (normalized order IDs, dates, item names/SKUs/categories/brands, frequency signals), what is excluded, prerequisites, and how to recover when sessionId is needed. Nothing essential is missing for correct invocation.

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 baseline is 3. The description doesn't materially expand parameter meaning beyond the schema; it only hints at sessionId retry behavior already covered in the sessionId parameter description.

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 uses a specific verb and resource: 'Get the owner's on-demand purchase history from a linked enterprise partner account.' It clearly identifies the data scope (purchase history, normalized items, frequency signals) and distinguishes this read tool from sibling purchase/search tools.

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: 'when the owner asks to use past orders/history/loyalty from a specific partner, or before a repeat/personalized order in an enterprise store.' It also gives workflow guidance: use the context for product choice, then verify price/stock with search_products or get_product before create_purchase.

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.