Skip to main content
Glama

Get Random Book

get_random_book
Read-onlyIdempotent

Get a random book that has an image, optionally constrained to a price range in EUR (minPrice/maxPrice, both inclusive; defaults cover the whole catalog — the bounds are in EUR, while the book itself is priced in its own bookseller currency, so a book returned under a 50 EUR cap can be shown as 45 CHF). Useful for discovery and serendipity — "show me something interesting", gift ideas, sampling the marketplace. Every call is an independent draw that picks a bookseller first, then one of its books, so small catalogues show as often as large ones. The result has the same detailed format as get_book (full description, image URLs, bookseller contact), with topic names localized via the language parameter.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_random_book"
  }
}

Input Schema

NameRequiredDescriptionDefault
languageNoLanguage code (ISO 639-1) for localized topic names (default: the language of the Accept-Language header of the MCP request, else "fr"). Examples: "fr", "en", "de"
maxPriceNoMaximum price in EUR, inclusive (default: 1000000, i.e. effectively no upper bound)
minPriceNoMinimum price in EUR, inclusive (default: 0)

Output Schema

NameRequiredDescriptionDefault
bookYes

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?

Beyond the annotations it discloses the non-obvious mechanics: each call is an independent draw, booksellers are sampled before books so small catalogues appear as often as large ones, and the EUR bound may not match the displayed bookseller currency (a 50 EUR cap can yield a 45 CHF listing). That currency caveat is exactly the kind of trap an agent would otherwise misread. Note a mild tension with idempotentHint=true — repeat calls with identical arguments return different books — though the annotation's intent (no side effects, safe to retry) is not violated.

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 key constraint (random, image-bearing, optional price range) is front-loaded, then mechanics, then use cases, then return shape — a sensible order. It is dense but long, and the parenthetical currency example is verbose, though it carries real information.

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 an output schema present and full parameter documentation, the description covers everything left: sampling bias, currency semantics, call independence, and localization behavior. An agent can call this correctly and interpret the result without further questions.

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 the baseline is 3; the description earns an extra point by explaining that minPrice/maxPrice are inclusive and denominated in EUR while the returned book is priced in its own bookseller currency. The language parameter is left to the schema's ISO 639-1 documentation, which is adequate.

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?

The description opens with a specific verb and resource ('Get a random book that has an image') and immediately scopes it with an optional price constraint. The randomization model (bookseller first, then book) and the 'same detailed format as get_book' reference make it unmistakable against siblings like search_books or get_book.

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 names concrete use cases — discovery, serendipity, 'show me something interesting', gift ideas, marketplace sampling — which tells an agent when this is the right call versus a targeted search. It stops short of an explicit exclusion ('use search_books instead when you have criteria'), so it is clear context without full routing guidance.

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