mcp-books
v2.1.0Search 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…
| Parameter | Type | Description |
|---|---|---|
query * | string | Words, or a phrase in double quotes such as '"call me ishmael"'. |
fan_out | boolean | Whether 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… |
limit | integer | Matches 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_chars | integer | Budget 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_match | integer | Passages to keep per match. A long work matches in several places, and the later ones rarely say anything the first did not. |
page | integer | Which page of matches, from 1. Each archive is paged separately. |
sources | array | Archives 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…
| Parameter | Type | Description |
|---|---|---|
query * | string | A title, a creator, a subject, or plain words. |
fan_out | boolean | Whether 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… |
limit | integer | Rows to take from each archive, so one archive cannot fill the whole list. |
media_type | string | The 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… |
page | integer | Which page of rows, from 1. Each archive is paged separately. |
sort | string | Applied 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… |
sources | array | Archives to ask, by id. Left out, they are all asked, which is the point of this tool. |
year_from | integer | Earliest 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_to | integer | Latest 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…
| Parameter | Type | Description |
|---|---|---|
identifier * | string | From a search, such as 'archive:mobydickorwhale01melv' or 'loc:sn83030214/1900-01-01/ed-1/seq-1'. |
max_copies | integer | Copies to list. The answer says how many more the record holds. |
max_text_chars | integer | Characters 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. |
sections | array | Which parts to return besides the record's identity and its terms of reuse. |
text_offset | integer | Where to resume in the record's prose, in characters from its start. |