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.

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": {
      "book": "<book>",
      "locale": "<locale>"
    },
    "name": "buy_book"
  }
}

Input 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
    • changedInput schema / properties / book / enum
      Previous value: -[
      -  "nobody-writes-code",
      -  "nobody-owns-money",
      -  "from-closures-to-autonomous-systems"
      -]New value: +[
      +  "nobody-writes-code",
      +  "nobody-owns-money",
      +  "from-closures-to-autonomous-systems",
      +  "beautiful-computer"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / book / enum
      Previous value: -[
      -  "nobody-writes-code",
      -  "nobody-owns-money"
      -]New value: +[
      +  "nobody-writes-code",
      +  "nobody-owns-money",
      +  "from-closures-to-autonomous-systems"
      +]
  3. Changed1 schema field changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  4. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Far beyond the annotations, the description discloses that money may be spent, the required OAuth scope ('mikefluff:purchase'), the HTTP 401 sign-in flow, the three payment paths (wallet auto-charge within a limit, per-purchase link, card/PIX fallback), and the agent's self-purchase x402Url route. It also names what happens when the book is already owned, which the annotations could never convey.

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?

The critical warning ('SIDE EFFECT, MAY SPEND MONEY') is front-loaded before any mechanics, which is the right ordering. The middle section chains several payment fallbacks into long sentences, but each clause carries distinct operational information rather than filler.

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?

For a mutating, money-spending tool with no output schema, the description covers authentication, cost exposure, all result branches, and the agent-identity path, which is everything an agent needs to call it correctly. Nothing material about invocation or outcome is left unspecified.

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 book slug, email, and locale params are already documented in the schema, including locale's effect on language and currency. The description adds no meaning beyond that for any individual parameter, so the baseline of 3 applies.

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 opens with a specific verb and resource ('buys a Mike Fluff Press book for the person signed in with INITE ID'), which is clearly distinct from sibling chapter- or course-purchase tools. It does not explicitly contrast itself with buy_chapter or buy_course, so an agent must infer the boundary from the noun alone.

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 an explicit gating condition: 'Only call when the user has asked to buy this book,' which is a real when-to-use restriction rather than vague context. It also explains the already-owned case, but it never names alternative tools (buy_chapter, buy_course) or states when those would be preferred.

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