mcp-libraryofcongress
v3.1.0Search inside scanned US newspapers and browse the Library of Congress catalogue.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
search_newspapers Search inside scanned newspaper pages
Search the text inside digitised American newspaper pages held by the Library of Congress. This reads what optical recognition took off the scanned pages, so it finds a phrase that appears nowhere in a title or a catalogue record. Double quotes change how the Library matches the words, and it decides what they mean: a page can come back carrying the words apart or in another order rather than the phrase as written. What the quotes do to the number of matching pages varies from one query to the next, so run the search both ways rather than expecting either form to return more. 'total' counts th…
| Parameter | Type | Description |
|---|---|---|
query * | string | Words or a quoted phrase, such as '"cure for influenza"'. The index reads the text off the pages themselves and holds single characters, so a query of one character is a query it answers. |
limit | integer | Matches to return. |
location | string | The state a paper was published in, written as the Library writes it: 'new york', 'district of columbia'. It is the value 'state' carries on the matches this tool returns. |
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 and the number of matches. |
max_excerpts_per_match | integer | Passages to keep per match. A page holding the words several times yields several, and the later ones rarely say anything the first did not. |
page | integer | Which page of matches, from 1. |
publication | string | One newspaper, named with its town and the years it ran: 'new-york tribune (new york [n.y.]) 1866-1924'. Take the wording from 'publication' on a match here, or from a title in search_items with media… |
year_from | integer | Earliest year, inclusive. |
year_to | integer | Latest year, inclusive. |
search_items Search the catalogue
Search the Library of Congress catalogue: books, photographs, maps, recordings, films, manuscripts, sheet music and newspaper titles. 'media_type' is required, because the Library keeps a separate catalogue for each kind of thing. This matches titles, creators and catalogue descriptions. It does not read the text inside a scan; use search_newspapers for a phrase printed on a newspaper page. Filters take the words the Library itself uses: 'subject' and 'location' as the rows here spell them, 'language' written in English, 'collection' as list_collections reports it under 'collection_filter'. A…
| Parameter | Type | Description |
|---|---|---|
media_type * | string | Which catalogue to search: books, photos, maps, audio, film-and-videos, manuscripts, notated-music or newspapers. 'newspapers' holds the papers themselves; a phrase printed on a page belongs in search… |
query * | string | Words to look for in titles, creators and catalogue descriptions. The catalogue index holds no word of a single letter, so at least one word has to run to two letters or more, unless it is written in… |
collection | string | A collection, named exactly as list_collections reports it under 'collection_filter'. |
language | string | A language, written in English: 'english'. |
limit | integer | |
location | string | A place, such as 'oklahoma'. |
online_only | boolean | Keep to material with a digitised copy. Set false to include shelf-only records. |
page | integer | |
sort | string | Order of the results. |
subject | string | A subject heading, such as 'crime'. |
year_from | integer | Earliest year, inclusive. |
year_to | integer | Latest year, inclusive. |
get_item Read a record
Read one Library of Congress record by its identifier, as returned by search_items or search_newspapers. An identifier can carry slashes: a single newspaper issue is named by its paper, its date and its edition together. Sections are opt-in: 'basic' is the default and covers what a description needs. 'date' carries only the precision the record's own words support, and 'date_stated' repeats those words, which can be a span of years the record was filed at the opening of. Where the Library has established no date it files the record under a cataloguing code, which 'date_code' carries while 'dat…
| Parameter | Type | Description |
|---|---|---|
identifier * | string | Record identifier, such as '2017645459' or 'sn83045462/1929-02-03/ed-1'. |
max_description_chars | integer | Characters of the description to return in one call. |
offset | integer | Where to resume the description. |
sections | array | Which parts to return. Each one beyond 'basic' adds to the size of the answer. |
list_collections List the digital collections
List the digital collections of the Library of Congress: bodies of material a curator chose, described and published together. Use it to see what is there before searching, since a collection names a corpus that a query would have to guess at. 'collection_filter' on each row is the wording search_items takes as its 'collection' argument, and 'searchable_media_types' names the catalogues that filter can be sent to. A collection whose 'searchable_media_types' is empty gathers a kind of thing the catalogue search is not divided into, such as web archives; set 'searchable_only' to leave those out.…
| Parameter | Type | Description |
|---|---|---|
limit | integer | Collections to return. |
max_description_chars | integer | Budget for one collection's description. |
page | integer | Which page of collections, from 1. |
searchable_only | boolean | Keep only the collections whose formats name a media_type, which are the ones search_items can be asked for. |