Skip to main content
Glama

get_product_purchase

Read-only

Retrieves a one-time product purchase's status and details by token, including purchase and acknowledgement states. Use it to verify ownership before refunding, acknowledging, or consuming.

Instructions

Get the status of a one-time product purchase by its purchase token: productLineItem (productId and productOfferDetails), purchaseStateContext (PURCHASED, CANCELLED or PENDING), acknowledgementState, orderId, purchaseCompletionTime, regionCode, the app's obfuscated account/profile ids and testPurchaseContext for test purchases. Use it to check whether a customer really owns an item before refund_order, acknowledge_product_purchase or consume_product_purchase.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "token": "<token>"
    },
    "name": "get_product_purchase"
  }
}

Input Schema

NameRequiredDescriptionDefault
tokenYesPurchase token of the purchase, as issued to the user's device by Google Play Billing. Also returned as purchaseToken by get_orders and list_voided_purchases.
package_nameNoApp package name, e.g. 'com.acme.app' (defaults to GOOGLE_PLAY_PACKAGE_NAME)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.6.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered. The description goes further by enumerating the returned fields (purchaseStateContext values, acknowledgementState, orderId, obfuscated ids, testPurchaseContext), which is genuinely useful behavior beyond the annotations, though it says nothing about error cases such as an invalid or foreign token.

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?

Front-loaded with the verb, resource and lookup key, and the second sentence earns its place by naming the workflow. The return-field list in the first sentence is dense but justified given there is no output schema.

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?

With no output schema, the description carries the return-shape burden and does so by listing the key fields an ownership check depends on. A note on failure behavior for a bad token would make it complete, but nothing essential for a correct call is missing.

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 coverage is 100%: both the token provenance (issued by Google Play Billing, also returned by get_orders and list_voided_purchases) and the package_name default are already documented in the schema. The description adds only that the token identifies the purchase, so the baseline of 3 applies.

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 first clause states a specific verb and resource ('Get the status of a one-time product purchase by its purchase token'), which separates it from the subscription sibling get_subscription_purchase and from list_one_time_products. An agent can pick this tool without opening the schema.

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 second sentence gives an explicit use case and names three downstream tools (refund_order, acknowledge_product_purchase, consume_product_purchase) that depend on the result. It stops short of stating exclusions, such as routing subscription queries to get_subscription_purchase, so it is clear but not fully routing-aware.

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