Skip to main content
Glama
mcp-archiveorg

mcp-archiveorg

Search works and editions

search_books
Read-onlyIdempotent

Search Open Library's Internet Archive catalogue by title, author, subject, place, time, person, publication year, page count, or language, then sort results by relevance, rating, readers, or date.

Instructions

Find a book on Open Library, the Internet Archive's catalogue of works, either by name or by description. Pass 'query' when you know what you are looking for: a title, an author. Free text matches parts of words and reads titles and authors together, so a name also finds works by authors whose name merely contains it: read 'authors' on each row before treating a result as that author's work. Pass the criteria instead when you do not, and they combine: 'subject' for what a work is catalogued under, 'place' for where it is set, 'time' for the period it treats, 'person' for who it is about, plus ranges on the year of first publication and on the page count. 'sort' by rating or by readers answers 'what is worth reading', which relevance alone does not. 'first_published_year' is the year Open Library derives from its edition records, and a reissue or a mistyped edition can put it centuries from the real date; 'newest' and 'oldest' rank on that field, so the rows carrying the doubtful years lead the order. Answers who wrote a book, when it first appeared and how many editions exist, which the item catalogue describes poorly because it holds one upload at a time. 'archive_identifiers' lists up to 3 scans of the work: pass one to get_item, or use it to read the book itself. 'scan_count' says how many the work has. A scan is one edition, and a work first printed centuries ago is often held only as a later reissue or a translation, so read the scan's own record before dating what it holds. Use this to identify a work, and search_inside to find a phrase within one.

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": "search_books"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNo
sortNo'rating' is how readers scored it, 'readers' is how many recorded reading it, and both answer a question relevance cannot. 'newest' and 'oldest' rank on 'first_published_year', which the index takes from edition records: read that field on each row against the work's page before repeating it.relevance
timeNoThe period the work treats, such as '20th century'.
limitNo
placeNoWhere the work is set, such as 'Shanghai'.
queryNoTitle or author, as free text. Optional when a criterion below is given.
personNoWho the work is about, such as 'Napoleon'.
subjectNoWhat the work is catalogued under, such as 'grief' or 'spy stories'. Also carries prizes and lists, such as 'Booker Prize'.
year_toNoLatest first publication.
languageNoThree-letter code of the language, such as 'eng' or 'fre'.
pages_maxNoLongest acceptable work. The count is a median across editions.
pages_minNoShortest acceptable work.
year_fromNoEarliest first publication.

Output Schema

NameRequiredDescriptionDefault
pageYes
booksYes
notesYes
queryYesThe free text the caller sent, as it was sent. Null when the search was made of criteria alone.
totalYesWorks matching, not the number returned.
searched_forYesWhat this answer answers, in words: the free text and every criterion applied.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.1.0
    • removedOutput schema / properties / query / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / query / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. Changed5 schema fields changedv1.5.0
    • addedOutput schema / properties / query / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / query / description
      Previous value: -"What was searched for, criteria included."New value: +"The free text the caller sent, as it was sent. Null when the search was made of criteria alone."
    • removedOutput schema / properties / query / type
      Removed value: -"string"
    • addedOutput schema / properties / searched_for
      Added value: +{
      +  "description": "What this answer answers, in words: the free text and every criterion applied.",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "query",
      -  "total",
      -  "page",
      -  "books",
      -  "notes"
      -]New value: +[
      +  "query",
      +  "searched_for",
      +  "total",
      +  "page",
      +  "books",
      +  "notes"
      +]
  3. Changed6 schema fields changedv1.3.0
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / sort / description
      Previous value: -"'rating' is how readers scored it, 'readers' is how many recorded reading it, and both answer a question relevance cannot."New value: +"'rating' is how readers scored it, 'readers' is how many recorded reading it, and both answer a question relevance cannot. 'newest' and 'oldest' rank on 'first_published_year', which the index takes from edition records: read that field on each row against the work's page before repeating it."
    • changedOutput schema / properties / books / items / properties / archive_identifiers / description
      Previous value: -"Scans of this work held by the Archive. Pass one to get_item."New value: +"Scans of this work held by the Archive. Pass one to get_item. At most 3 are listed, so the list is a sample whenever 'scan_count' is larger; the work's page on Open Library holds them all."
    • addedOutput schema / properties / books / items / properties / first_published_year / description
      Added value: +"The year Open Library derives from its edition records. A reissue or a mistyped edition can put it centuries from the date the work first appeared, so check it against the work's page before citing it."
    • addedOutput schema / properties / books / items / properties / scan_count
      Added value: +{
      +  "description": "Scans of this work the Archive holds, whatever the list above shows.",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • changedOutput schema / properties / books / items / required
      Previous value: -[
      -  "title",
      -  "authors",
      -  "first_published_year",
      -  "edition_count",
      -  "archive_identifiers",
      -  "page_count",
      -  "subjects",
      -  "source_url"
      -]New value: +[
      +  "title",
      +  "authors",
      +  "first_published_year",
      +  "edition_count",
      +  "archive_identifiers",
      +  "scan_count",
      +  "page_count",
      +  "subjects",
      +  "source_url"
      +]
  4. Changed16 schema fields changedv1.1.0
    • addedInput schema / properties / language
      Added value: +{
      +  "description": "Three-letter code of the language, such as 'eng' or 'fre'.",
      +  "maxLength": 20,
      +  "minLength": 2,
      +  "type": "string"
      +}
    • addedInput schema / properties / pages_max
      Added value: +{
      +  "description": "Longest acceptable work. The count is a median across editions.",
      +  "maximum": 100000,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / pages_min
      Added value: +{
      +  "description": "Shortest acceptable work.",
      +  "maximum": 100000,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / person
      Added value: +{
      +  "description": "Who the work is about, such as 'Napoleon'.",
      +  "maxLength": 100,
      +  "minLength": 2,
      +  "type": "string"
      +}
    • addedInput schema / properties / place
      Added value: +{
      +  "description": "Where the work is set, such as 'Shanghai'.",
      +  "maxLength": 100,
      +  "minLength": 2,
      +  "type": "string"
      +}
    • changedInput schema / properties / query / description
      Previous value: -"Title, author or subject."New value: +"Title or author, as free text. Optional when a criterion below is given."
    • addedInput schema / properties / sort
      Added value: +{
      +  "default": "relevance",
      +  "description": "'rating' is how readers scored it, 'readers' is how many recorded reading it, and both answer a question relevance cannot.",
      +  "enum": [
      +    "relevance",
      +    "rating",
      +    "readers",
      +    "newest",
      +    "oldest"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / subject
      Added value: +{
      +  "description": "What the work is catalogued under, such as 'grief' or 'spy stories'. Also carries prizes and lists, such as 'Booker Prize'.",
      +  "maxLength": 100,
      +  "minLength": 2,
      +  "type": "string"
      +}
    • addedInput schema / properties / time
      Added value: +{
      +  "description": "The period the work treats, such as '20th century'.",
      +  "maxLength": 100,
      +  "minLength": 2,
      +  "type": "string"
      +}
    • addedInput schema / properties / year_from
      Added value: +{
      +  "description": "Earliest first publication.",
      +  "maximum": 2200,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / year_to
      Added value: +{
      +  "description": "Latest first publication.",
      +  "maximum": 2200,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "query"
      -]
    • addedOutput schema / properties / books / items / properties / page_count
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Median pages across editions, which is what the index holds."
      +}
    • addedOutput schema / properties / books / items / properties / subjects
      Added value: +{
      +  "description": "What the work is catalogued under, trimmed to the most prominent.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / books / items / required
      Previous value: -[
      -  "title",
      -  "authors",
      -  "first_published_year",
      -  "edition_count",
      -  "archive_identifiers",
      -  "source_url"
      -]New value: +[
      +  "title",
      +  "authors",
      +  "first_published_year",
      +  "edition_count",
      +  "archive_identifiers",
      +  "page_count",
      +  "subjects",
      +  "source_url"
      +]
    • addedOutput schema / properties / query / description
      Added value: +"What was searched for, criteria included."
  5. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly, openWorld, idempotent and non-destructive, but the description adds substantial behavioral context beyond them: free-text matching reads titles and authors together, first_published_year is derived from edition records and can be wildly wrong, newest/oldest sort on that dubious field, archive_identifiers lists up to three scans, and a scan is one edition rather than a work. These are exactly the caveats an agent needs before calling and interpreting results.

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?

Purpose and primary usage are front-loaded, and nearly every sentence carries actionable information. It is dense and delivered as a single paragraph, which slightly hurts readability, but it avoids repetition and stays appropriately sized for a 13-parameter search tool with multiple behavioral caveats.

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, the output schema, and the sibling tools, the description is complete enough to call correctly: it covers purpose, query versus criteria selection, sorting caveats, output fields like archive_identifiers and scan_count, and when to use search_inside instead. Pagination details are minor and covered by the schema.

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 description coverage is high (85%), so the baseline is 3. The description goes beyond the schema by explaining how 'query' versus criteria interact, that criteria combine, and how sort fields relate to derived dates, adding useful cross-parameter semantics not captured in individual schema descriptions.

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?

States a specific verb and resource ('Find a book on Open Library') and distinguishes itself from siblings by naming search_inside and describing what the item catalogue does poorly. An agent can immediately tell this tool identifies works, whereas search_inside finds phrases within one.

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?

Explicitly says when to pass 'query' (title/author) versus criteria, explains that criteria combine, describes what each criterion means, and names sort behavior for 'what is worth reading'. It also names search_inside and get_item as the correct alternatives for different tasks.

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