Skip to main content
Glama

AI Source of Truth Evidence Rooms

AP2 checkout

ap2_get_cart

Ask Rooms for a merchant-signed checkout JWT (the AP2 cart) for one catalog item, for an org. The org's owner or admin then signs checkout and payment mandates for it. Scope: billing:write. REST twin: POST /api/ap2/orgs/:org/checkouts. Errors: unauthorized, insufficient_scope, not_found, forbidden, validation_error.

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": {
      "org_id": "<org_id>",
      "item_id": "<item_id>"
    },
    "name": "ap2_get_cart"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleNoThe case title, for one_off_case.
org_idYes
item_idYesA catalog item id, such as plan.investigator.month, credits, one_off_case, storage_gb.
quantityNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and openWorldHint=false; the description goes further by disclosing that the call mints a merchant-signed token, that a human owner/admin must subsequently sign mandates, that billing:write scope is required, and by enumerating the error taxonomy (unauthorized, insufficient_scope, not_found, forbidden, validation_error). It does not state token lifetime/expiry or whether repeated calls are idempotent, so it is strong but not complete.

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?

Four compact sentences lead with the core action, then scope, REST twin, and error list. Dense but every sentence carries information; the AP2 jargon ('cart') is glossed immediately as a merchant-signed checkout JWT. Minor cost is the run-on error sentence appended to the end.

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 still conveys what comes back (a merchant-signed checkout JWT), the auth scope, the REST equivalent, and failure modes — enough for an agent to invoke it correctly. Gaps are quantity semantics and token lifetime, which matter for repeated or quantity-based calls but not for a basic 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 coverage is 50%: item_id and title are documented in the schema, while org_id and quantity are bare. The description adds org scoping context ('for an org') that maps loosely to org_id, but says nothing about quantity (e.g., whether it applies to credits/storage items) or when title is required for one_off_case. It partially compensates for the coverage gap but leaves a meaningful hole.

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 states a concrete verb+resource: request a merchant-signed checkout JWT (the AP2 cart) for one catalog item within an org. That is far more specific than the name 'ap2_get_cart' alone, and the mention that the org's owner/admin subsequently signs checkout and payment mandates implicitly positions it before ap2_submit_payment_mandate. It stops short of explicitly contrasting itself with ap2_get_catalog or the mandate tools, so it is clear but not fully sibling-differentiated.

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?

It gives real usage context: this is the prerequisite step whose output an org owner or admin signs into checkout/payment mandates, and it requires the billing:write scope. What is missing is explicit exclusion guidance (e.g., which sibling to use for browsing items versus minting a cart) or conditions under which the call will fail by design beyond the error list.

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