Skip to main content
Glama

Buy a book

buy_book

SIDE EFFECT, MAY SPEND MONEY: buys a Mike Fluff Press book for the person signed in with INITE ID. Books are bought into an INITE account (the reader unlocks paid chapters for the account that paid), so this needs the person: OAuth scope "mikefluff:purchase"; without a token it is answered with HTTP 401 and the client signs the person in. If the person has allowed this shop to charge their INITE wallet, the book is paid at once within the limit they set. If not, the result is one link for the person: there they pay this time and, if they like, allow such payments from now on. Failing both, a payment link (card, PIX). An agent signed in as itself (client_credentials, its own did:web) buys under its own account and pays the returned x402Url from its INITE wallet (pay tool at billing.inite.ai/mcp/wallet). If they already own the book it says so instead. Only call when the user has asked to buy this book.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bookYesBook slug from list_books.
emailNoOptional: the user's email, for the receipt when the account has none.
localeYesLanguage of the book page and currency of the price.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Far exceeds the annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint). It discloses the OAuth scope required, the HTTP 401 unauthenticated path, wallet auto-charge vs. one-time link vs. card/PIX fallback, agent self-purchase via x402 wallet, and the money-spend side effect up front.

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?

Long but front-loaded: the critical 'SIDE EFFECT, MAY SPEND MONEY' warning leads, and each subsequent sentence carries distinct behavioral information (auth, payment paths, agent flow) rather than filler. Slightly dense but no wasted sentences.

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?

With no output schema, the description fully carries the return-behavior burden: it explains the payment link, the pay-now vs. recurring options, the already-owned message, and the agent wallet flow. Nothing an agent needs to call it correctly 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 description coverage is 100%, so the schema already documents book, email, and locale, including the locale's currency implication. The description adds little parameter-level detail beyond what the schema provides, so the 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?

Opens with a specific verb and resource ('buys a Mike Fluff Press book') and immediately flags the side effect. The scope (the signed-in person's account) is stated, so an agent can distinguish this from buy_course and the read-oriented siblings without inspecting schemas.

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?

Ends with an explicit invocation condition: 'Only call when the user has asked to buy this book,' and notes that owning the book already produces a different result. It does not name the nearest alternative (buy_course) for routing, so it stops short of a 5.

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