Skip to main content
Glama

Purchase Commerce Service

purchase_commerce_service

Buy a listed Commerce Assurance service with a buyer-signed x402 payment from your own wallet; no separate approval. Omit paymentPayload for payment terms.

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": {
      "serviceId": "<serviceId>"
    },
    "name": "purchase_commerce_service"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputNoA JSON object accepted only when its canonical serialized form is at most 50000 characters and its nesting depth is at most 64.
serviceIdYes
buyerWalletIdNo
idempotencyKeyNo
paymentPayloadNoA JSON object accepted only when its canonical serialized form is at most 50000 characters and its nesting depth is at most 64.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / paymentPayload
      Added value: +{
      +  "additionalProperties": true,
      +  "description": "A JSON object accepted only when its canonical serialized form is at most 50000 characters and its nesting depth is at most 64.",
      +  "type": "object"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "serviceId",
      -  "buyerWalletId",
      -  "input",
      -  "idempotencyKey"
      -]New value: +[
      +  "serviceId"
      +]
  2. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare a non-read-only, non-destructive, closed-world mutation, and the description adds real context beyond them: payment must be buyer-signed via x402, comes from the caller's own wallet, and needs no separate approval step. It stops short of saying what side effects result (a purchase record? an escrow hold?) or whether a follow-up call such as fulfill_commerce_purchase is required to complete delivery.

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?

Two compact sentences, front-loaded with the action and payment mechanism, with the parameter rule placed after. No filler or restatement of the title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter mutation with a nested free-form object and no output schema, the definition covers the payment mechanism but omits what the call returns, how to idempotently retry, and what to do after purchase (check status, fulfill, recover). Those gaps matter more here than for a simple read tool.

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 40%, so the description must compensate for gaps. It does clarify the two-phase meaning of paymentPayload (omit it to receive payment terms), but says nothing about serviceId, buyerWalletId, idempotencyKey (replay/retry semantics), or the free-form 'input' object that presumably carries order details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('Buy') and a specific resource ('a listed Commerce Assurance service'), which clearly separates it from inspect/register/discover siblings. It does not explicitly name an alternative purchase path, but the 'no separate approval' phrase implicitly contrasts it with the authorized-purchase flow.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The clause 'Omit paymentPayload for payment terms' gives a genuine conditional usage rule and reveals a two-step flow (fetch terms, then buy). However, there is no explicit guidance on when to prefer this tool over the sibling purchase paths (e.g. execute_authorized_purchase, fulfill_commerce_purchase) or what prerequisites a buyer wallet must satisfy.

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.

Resources