mcp-books

v2.1.0
io.github.smeet666/mcp-books Checked 4 days ago Published 1 month ago

Search the Internet Archive, the Library of Congress and data.bnf.fr at once, in one answer.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

search_inside Find a phrase in the scanned text of every archive

Search the machine-read text of every archive this server reads that holds any, at the same time, and get one list of where a phrase was printed. The archives behind this tool hold different material, so the list is additive: it is the places a phrase appears in each corpus, put together, rather than the same question answered twice. 'per_source' names what each corpus is. A match carries 'page_number', which is a real leaf on an archive whose index holds one and null on an archive whose index holds none. That null is the index having no leaf, never a page this server dropped, and no page is e…

ParameterTypeDescription
query *stringWords, or a phrase in double quotes such as '"call me ishmael"'.
fan_outbooleanWhether to derive shorter and differently spelled wordings from the query and ask each archive for the union of what they return. A question written as a sentence returns nothing where every word give…
limitintegerMatches to take from each archive, so one archive cannot fill the whole list. The text block shows about six matches; the rest of what comes back is in the structured output.
max_excerpt_charsintegerBudget for one passage. Read it together with 'max_excerpts_per_match': the size of the answer is the product of the two, the limit, and the number of archives.
max_excerpts_per_matchintegerPassages to keep per match. A long work matches in several places, and the later ones rarely say anything the first did not.
pageintegerWhich page of matches, from 1. Each archive is paged separately.
sourcesarrayArchives to ask, by id. Left out, every archive that reads machine-read text is asked, which is the point of this tool.

search_items Search every catalogue at once

Search the catalogue of every archive this server reads, at the same time, for a title, a creator or a subject, and get one merged list. Each row carries the id get_item takes, and that id names the archive it came from, so nothing has to be guessed afterwards. 'media_type' keeps one name across the archives and a vocabulary per archive, because the same word does not name the same set of things twice. An archive that files nothing under the name you give is not asked and is named as absent, with its own names listed, rather than asked under a translation. An archive that keeps one catalogue p…

ParameterTypeDescription
query *stringA title, a creator, a subject, or plain words.
fan_outbooleanWhether to derive further wordings from the query and ask each archive for the union of what they return. A question written as a sentence returns nothing where every word given has to appear, and the…
limitintegerRows to take from each archive, so one archive cannot fill the whole list.
media_typestringThe kind of material, in the vocabulary of whichever archive uses that name. the Internet Archive files texts, movies, audio, image, software, data, web; the Library of Congress files books, photos, m…
pageintegerWhich page of rows, from 1. Each archive is paged separately.
sortstringApplied inside each archive. The merged list stays interleaved, because no order runs across archives. 'oldest' and 'newest' run on a date field carrying a year and no era, and a record stating no dat…
sourcesarrayArchives to ask, by id. Left out, they are all asked, which is the point of this tool.
year_fromintegerEarliest year, in each archive's own reading of what a year is. Given with 'year_to', it must not be the later of the two: a range running backwards names no year and is refused rather than read diffe…
year_tointegerLatest year, in each archive's own reading of what a year is. It cannot be earlier than 'year_from'.

get_item Read one record, routed by the archive its identifier names

Read one record in full from the archive its identifier names: what it is, who made it, when, what the archive says about it, and what a reader can open. 'identifier' must come from search_inside or search_items. It names the archive, so this reads the right one without guessing; a string no archive would have minted is refused, and a shape more than one archive mints is refused rather than sent to a guess, because sending it anywhere answers about the wrong thing. Terms of reuse come back on every read and belong to that record alone. A record stating none has granted nothing, and silence is…

ParameterTypeDescription
identifier *stringFrom a search, such as 'archive:mobydickorwhale01melv' or 'loc:sn83030214/1900-01-01/ed-1/seq-1'.
max_copiesintegerCopies to list. The answer says how many more the record holds.
max_text_charsintegerCharacters of prose to return. The text block shows roughly the first 1400 of them and the whole window is in the structured output. The answer says where to resume.
sectionsarrayWhich parts to return besides the record's identity and its terms of reuse.
text_offsetintegerWhere to resume in the record's prose, in characters from its start.