Skip to main content
Glama

Search Books

search_books

Search books by title, author, or free text using the Open Library API and get matching book records with title, authors, publish year, and edition count.

Instructions

Search books by title, author, or free text via the Open Library search API and return a list of matching book records.

Queries Open Library over the network (no browser or authentication required). Returns a list of dicts, each typically containing: title (str), author_names (list of str), first_publish_year (int or None), edition_count (int), and the Open Library work key (str, e.g. "/works/OL45804W"). Fields missing upstream are omitted or None. Returns an empty list when the query matches nothing. Read-only: no local files or state are modified.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesTitle, author, or free-text search string. Type: string. Example: "the hobbit tolkien". Required, no default.
max_resultsNoMaximum number of books to return. Type: integer. Example: 10. Default: 20. Allowed: any positive integer.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
countNo
errorsNo
scraperNo
source_urlsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / max_results / description
      Previous value: -"Max books to return (default 20)."New value: +"Maximum number of books to return. Type: integer. Example: 10. Default: 20. Allowed: any positive integer."
    • changedInput schema / properties / query / description
      Previous value: -"Title, author, or free-text search."New value: +"Title, author, or free-text search string. Type: string. Example: \"the hobbit tolkien\". Required, no default."
  2. Changed18 schema fields changedv1.3.3
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / max_results / description
      Added value: +"Max books to return (default 20)."
    • removedInput schema / properties / max_results / title
      Removed value: -"Max Results"
    • addedInput schema / properties / query / description
      Added value: +"Title, author, or free-text search."
    • removedInput schema / properties / query / title
      Removed value: -"Query"
    • removedInput schema / title
      Removed value: -"search_booksArguments"
    • removedOutput schema / $defs
      Removed value: -{
      -  "ToolError": {
      -    "description": "A non-fatal problem encountered while scraping.",
      -    "properties": {
      -      "message": {
      -        "title": "Message",
      -        "type": "string"
      -      },
      -      "url": {
      -        "title": "Url",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "url",
      -      "message"
      -    ],
      -    "title": "ToolError",
      -    "type": "object"
      -  }
      -}
    • removedOutput schema / properties / count / title
      Removed value: -"Count"
    • removedOutput schema / properties / data / title
      Removed value: -"Data"
    • removedOutput schema / properties / errors / items / $ref
      Removed value: -"#/$defs/ToolError"
    • addedOutput schema / properties / errors / items / description
      Added value: +"A non-fatal problem encountered while scraping."
    • addedOutput schema / properties / errors / items / properties
      Added value: +{
      +  "message": {
      +    "type": "string"
      +  },
      +  "url": {
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / properties / errors / items / required
      Added value: +[
      +  "url",
      +  "message"
      +]
    • addedOutput schema / properties / errors / items / type
      Added value: +"object"
    • removedOutput schema / properties / errors / title
      Removed value: -"Errors"
    • removedOutput schema / properties / scraper / title
      Removed value: -"Scraper"
    • removedOutput schema / properties / source_urls / title
      Removed value: -"Source Urls"
    • removedOutput schema / title
      Removed value: -"ScrapeToolResult"
  3. Added

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description fully carries the behavioral disclosure burden. It states that the tool queries the network, requires no browser/auth, returns empty lists for no matches, omits missing fields or uses None, and is read-only with no local file/state modification. This is unusually complete for a search tool.

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?

The description is front-loaded with the action, then provides targeted details about network behavior, return structure, empty results, and read-only semantics. Every sentence adds value for an agent deciding whether and how to call the tool; there is no filler or redundancy.

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 two-parameter search tool with an output schema, the description covers the important invocation context: what it searches, where it queries, what it returns, how missing fields are handled, the empty-list case, and that it is non-destructive. Nothing essential is missing for correct selection and use.

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 baseline is 3. The description repeats that the query can be by title, author, or free text, but adds no parameter-specific meaning beyond what the schema already documents for 'query' and 'max_results'. It neither compensates for a gap nor introduces new confusion.

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-resource pair: 'Search books by title, author, or free text via the Open Library search API and return a list of matching book records.' It names the exact upstream source (Open Library) and the book domain, which clearly differentiates it from sibling tools like search_images, search_youtube, or scrape_url.

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?

The description gives clear context: it is a network-based search for book records, requires no browser or authentication, and is read-only. It does not explicitly name alternative tools or state when not to use it, but the domain specificity and the large set of clearly unrelated siblings make the intended usage obvious.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.