Skip to main content
Glama

Buy package

buy_package

Starts the purchase of a package of sessions for your user. Returns checkoutUrl, a Stripe page where they pay. Call it only after your user agrees to buy it, at its price. Nothing is bought until they pay. Then they get an email with their package link, /pkg/…, to book its sessions. To book with it, call book with package_token.

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": {
      "package_id": "<package_id>",
      "name": "<name>",
      "email": "<email>"
    },
    "name": "buy_package"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesYour user's full name.
emailYesYour user's email address: their package link goes there.
localeNoThe language of the emails to your user about it. Defaults to the host's language.
package_idYesThe package's id, from the host's package link.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only flag openWorldHint and non-idempotency; the description adds the real behavioral picture: the call returns a checkoutUrl, payment happens off-tool on Stripe, an email with a /pkg/… link is sent afterwards, and the purchase is not completed by this call. That is exactly the context an agent needs to avoid claiming a purchase succeeded.

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?

Five short sentences, front-loaded with the action and immediately followed by the return value, precondition, side effect, and next step. No filler or repetition.

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?

For a multi-step purchase flow with no output schema, the description covers the return value (checkoutUrl), the fulfillment path (email link), and the handoff to book. The only shortfall is that it does not describe any other response fields or how to check whether a started purchase was actually paid.

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%, so all four parameters are already documented, and the description largely restates the email/path relationship the schema already states. It adds the concept of package_token flowing into book, but nothing about package_id sourcing or locale behavior beyond what the schema says. Baseline 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?

"Starts the purchase of a package of sessions for your user" gives a specific verb and resource, and the description immediately distinguishes the adjacent step ("To book with it, call book with package_token"). An agent can tell this apart from book and get_package_purchase from the text alone.

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?

Explicit preconditions: "Call it only after your user agrees to buy it, at its price," plus the crucial clarification that "Nothing is bought until they pay" so the agent does not misreport success. It also routes to the follow-up action (book with the package_token), covering both when to call and what comes next.

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