Skip to main content
Glama

Search Books

openlibrary_search_books
Read-only

Full-text book search across Open Library works. Supports field filters (title, author, subject, publisher, ISBN, language) and returns work-level records with edition counts, cover IDs, and reading availability. Use query for general search or combine specific field filters. Results are work-level — drill into editions via openlibrary_get_editions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
isbnNoFind works that have editions with this ISBN (10 or 13 digits, hyphens ignored).
sortNoSort order. "relevance" uses Solr scoring. "new"/"old" sort by first publish year. "rating" by average community rating. "editions" by edition count.relevance
limitNoMax results to return. Higher values increase response size; prefer 10–20 for exploration.
queryNoFull-text search query. Supports Solr field prefixes: title:, author:, subject:, publisher:, isbn:, language:. Omit to use the filter parameters instead.
titleNoFilter by title. Matched against work title and alternative titles.
authorNoFilter by author name. Partial names work.
offsetNoZero-based offset for pagination.
subjectNoFilter by subject tag (e.g., "science fiction", "history").
languageNoRestrict results to one language. Takes a 3-letter MARC code (e.g., "eng", "fre", "ger", "chi") — the same vocabulary openlibrary_get_edition and openlibrary_get_editions return. A 2-letter ISO 639-1 code (e.g., "en", "fr") is accepted and translated to its MARC equivalent; an unrecognized 2-letter code is rejected rather than silently ignored. The equivalent in-query form is language:eng.
publisherNoFilter by publisher name. Partial names work (e.g., "Penguin").
include_availabilityNoInclude live reading availability from Internet Archive (borrow/read status). Adds ~200ms latency. Use when the user needs to know if they can read the book online.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
totalNoTotal matching works across all pages.
worksNoMatching works, up to limit.
noticeNoGuidance when the page is empty (how to broaden a query that matched nothing, or which offset to retry when offset ran past the end) or when the text output capped a per-work list. Absent when neither applies.
offsetNoZero-based offset of the first returned result.
queryEchoNoThe effective search criteria as the server interpreted them — query string plus any active field filters. Absent when only a bare query is used.
totalCountNoTotal matching works across all pages — the upstream match count, reported even when this page is empty because offset ran past the end.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / works / items / properties / availability / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "available_to_borrow": {
      -        "description": "True when the book can be borrowed.",
      -        "type": "boolean"
      -      },
      -      "available_to_browse": {
      -        "description": "True when the book can be browsed for free.",
      -        "type": "boolean"
      -      },
      -      "available_to_waitlist": {
      -        "description": "True when a waitlist is available.",
      -        "type": "boolean"
      -      },
      -      "is_lendable": {
      -        "description": "True when the book can be lent.",
      -        "type": "boolean"
      -      },
      -      "is_previewable": {
      -        "description": "True when a limited preview is available.",
      -        "type": "boolean"
      -      },
      -      "is_readable": {
      -        "description": "True when the book is freely readable online.",
      -        "type": "boolean"
      -      },
      -      "is_restricted": {
      -        "description": "True when access is restricted.",
      -        "type": "boolean"
      -      },
      -      "openlibrary_edition": {
      -        "description": "Edition OLID the availability check was resolved against.",
      -        "type": "string"
      -      },
      -      "status": {
      -        "description": "Availability status string from Internet Archive.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "status",
      -      "available_to_browse",
      -      "available_to_borrow",
      -      "available_to_waitlist",
      -      "is_readable",
      -      "is_lendable",
      -      "is_previewable",
      -      "is_restricted"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "available_to_borrow": {
      +        "description": "True when the book can be borrowed. Absent when not reported.",
      +        "type": "boolean"
      +      },
      +      "available_to_browse": {
      +        "description": "True when the book can be browsed for free. Absent when not reported.",
      +        "type": "boolean"
      +      },
      +      "available_to_waitlist": {
      +        "description": "True when a waitlist is available. Absent when not reported.",
      +        "type": "boolean"
      +      },
      +      "is_lendable": {
      +        "description": "True when the book can be lent. Absent when not reported.",
      +        "type": "boolean"
      +      },
      +      "is_previewable": {
      +        "description": "True when a limited preview is available. Absent when not reported.",
      +        "type": "boolean"
      +      },
      +      "is_readable": {
      +        "description": "True when the book is freely readable online. Absent when not reported.",
      +        "type": "boolean"
      +      },
      +      "is_restricted": {
      +        "description": "True when access is restricted. Absent when not reported.",
      +        "type": "boolean"
      +      },
      +      "openlibrary_edition": {
      +        "description": "Edition OLID the availability check was resolved against. Absent when not reported.",
      +        "type": "string"
      +      },
      +      "status": {
      +        "description": "Availability status from Internet Archive, e.g. \"open\" (freely readable), \"borrow_available\", \"borrow_unavailable\", \"private\", or \"error\" (the lending lookup failed, so no flags accompany it). \"unknown\" when Open Library sent no status.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "status"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / works / items / properties / availability / description
      Previous value: -"Live reading availability from Internet Archive. Present when include_availability is true and the work has an Internet Archive item. Null when include_availability is true but no IA item exists."New value: +"Live reading availability from Internet Archive, present when include_availability is true. Open Library leaves flags out for some works — an absent flag is unknown, not false. Null means no availability was returned for the work: always so without an Internet Archive item, and sometimes so for a work that has one."
  2. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "total",
      +      "offset",
      +      "works"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `unknown_language_code`: A 2-letter language value has no MARC equivalent, so no filter could be applied. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "unknown_language_code"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "total",
      -  "offset",
      -  "works"
      -]
  3. Changed3 schema fields changed
    • changedOutput schema / properties / notice / description
      Previous value: -"Recovery guidance when results are empty — echoes the search criteria and suggests how to broaden. Absent when results are found."New value: +"Guidance when the page is empty (how to broaden a query that matched nothing, or which offset to retry when offset ran past the end) or when the text output capped a per-work list. Absent when neither applies."
    • changedOutput schema / properties / totalCount / description
      Previous value: -"Total matching works across all pages. Absent when results are empty."New value: +"Total matching works across all pages — the upstream match count, reported even when this page is empty because offset ran past the end."
    • changedOutput schema / properties / works / items / properties / subjects / description
      Previous value: -"Up to 5 subject tags. Absent when no subjects are tagged."New value: +"Every subject tag the search index returned for this work. The text output caps the rendered list; this array is complete. Absent when no subjects are tagged. For the work record's own curated subject lists (places, times, people), use openlibrary_get_work."
  4. Changed4 schema fields changed
    • changedInput schema / properties / language / description
      Previous value: -"Two-letter ISO 639-1 language code (e.g., \"en\", \"fr\"). Influences but does not exclude results; use language:fr in query to hard-filter."New value: +"Restrict results to one language. Takes a 3-letter MARC code (e.g., \"eng\", \"fre\", \"ger\", \"chi\") — the same vocabulary openlibrary_get_edition and openlibrary_get_editions return. A 2-letter ISO 639-1 code (e.g., \"en\", \"fr\") is accepted and translated to its MARC equivalent; an unrecognized 2-letter code is rejected rather than silently ignored. The equivalent in-query form is language:eng."
    • addedInput schema / properties / language / pattern
      Added value: +"^[A-Za-z]{2,3}$"
    • changedOutput schema / properties / works / items / properties / ebook_access / description
      Previous value: -"\"public\" = freely readable. \"borrowable\" = borrow on Internet Archive. \"printdisabled\" = access for print-disabled users. \"no_ebook\" = no digital version."New value: +"\"public\" = freely readable. \"borrowable\" = borrow on Internet Archive. \"printdisabled\" = access for print-disabled users. \"no_ebook\" = no digital version. \"unclassified\" = a digital copy may exist but its access tier is not recorded."
    • changedOutput schema / properties / works / items / properties / ebook_access / enum
      Previous value: -[
      -  "no_ebook",
      -  "printdisabled",
      -  "borrowable",
      -  "public"
      -]New value: +[
      +  "no_ebook",
      +  "unclassified",
      +  "printdisabled",
      +  "borrowable",
      +  "public"
      +]
  5. Changed1 schema field changed
    • addedOutput schema / properties / totalCount
      Added value: +{
      +  "description": "Total matching works across all pages. Absent when results are empty.",
      +  "type": "number"
      +}
  6. Changed3 schema fields changed
    • removedOutput schema / properties / message
      Removed value: -{
      -  "description": "Recovery hint when results are empty — echoes the search criteria and suggests how to broaden. Absent when results are found.",
      -  "type": "string"
      -}
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Recovery guidance when results are empty — echoes the search criteria and suggests how to broaden. Absent when results are found.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / queryEcho
      Added value: +{
      +  "description": "The effective search criteria as the server interpreted them — query string plus any active field filters. Absent when only a bare query is used.",
      +  "type": "string"
      +}
  7. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already mark readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds behavioral detail beyond that, such as returning work-level records, edition counts, cover IDs, reading availability, and the ~200ms latency when include_availability is enabled. This gives the agent a clearer expectation of what is returned and the cost of a parameter.

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 two sentences, front-loaded with the purpose and key distinctions. It wastes no words and covers the essential behavioral aspects concisely. The structure is efficient and readable.

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?

Given the tool's complexity (11 parameters but all schema-covered) and the presence of an output schema, the description fully covers what an agent needs: the resource, the filtering capabilities, the output shape, and the relationship to sibling tools. Nothing material 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 each parameter is fully documented in the schema. The description adds a small bit of guidance ('Use query for general search or combine specific field filters') and clarifies the available sorts and filters, but it does not significantly extend the meaning beyond the schema's descriptions. Baseline 3 is appropriate.

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 clearly states the tool's function: full-text search across Open Library works with field filters. It names the resource (Open Library works), the verb (search), and explicitly contrasts with siblings like openlibrary_search_authors and openlibrary_search_inside, making it easy for an agent to select the right tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides explicit guidance on when to use this tool: 'Use query for general search or combine specific field filters.' It also instructs on the relationship with openlibrary_get_editions, saying 'drill into editions via openlibrary_get_editions.' Additionally, it notes the purpose of include_availability ('Use when the user needs to know if they can read the book online'), which is actionable.

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.