Skip to main content
Glama

ad_buy_item

Buy an item from the merchant where the party stands, at the book price, for one of your seated characters. Ledgered on the sheet; stock depletes and refreshes over table time. Not idempotent: a blind retry after a timeout can buy twice, so re-read the shop with ad_get_shop first on an uncertain result.

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": {
      "tableId": "<tableId>",
      "characterId": "<characterId>",
      "itemName": "<itemName>"
    },
    "name": "ad_buy_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
qtyNoQuantity (default 1).
tableIdYesThe table id.
itemNameYesCatalog item name, exactly as stocked.
characterIdYesYour character's id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the whole burden and does so: it discloses the ledger write, stock depletion and refresh over table time, and non-idempotency with concrete retry guidance. That is exactly the mutation/duplicate-purchase risk an agent needs surfaced before calling.

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?

Three sentences, front-loaded with purpose, then side effects, then the retry hazard. Every clause adds information; nothing is restated from the schema.

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 4-param mutation with no annotations and no output schema, the description covers side effects and failure/retry behavior well. It doesn't mention insufficient-funds or out-of-stock error behavior, a minor gap given the tool's transactional nature.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds meaning the schema doesn't: characterId must reference a *seated* character and the price is the book price (implying qty is multiplied at a fixed rate). Item name precision is left to the schema, which already covers it.

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?

Specific verb and resource ("Buy an item from the merchant") with scope qualifiers: only at the party's current location, at book price, for a seated character. This cleanly separates it from siblings like ad_sell_item and ad_get_shop without needing their 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?

Explicitly names ad_get_shop as the recovery step after an uncertain result and notes the seated-character prerequisite, which is real routing guidance. It never states when *not* to use it (e.g. selling or equipping paths), so it stops short of full when/when-not coverage.

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