Skip to main content
Glama
smeet666

mcp-libraryofcongress

Search inside scanned newspaper pages

search_newspapers
Read-onlyIdempotent

Search the OCR text inside digitized American newspaper pages to find phrases absent from titles or catalog records. Filter matches by state, publication, and year range, and get page-level excerpts with source links.

Instructions

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 the pages that match, and they page: ask for page 2, 3 and so on to see beyond the first answer. It is not a count of how many times the words occur. Each match names the newspaper, the date, the leaf of the issue and the state it was published in, and 'source_url' opens that leaf with the query applied. 'location' keeps to papers published in one state, 'publication' to a single paper, and 'year_from' with 'year_to' to a span of years. A filter matching nothing is dropped and the answer says so. Every match carries 'excerpt_kind', and the excerpts are labelled with it in the text. A 'passage' is the text around the words that matched. A 'page_opening' is the start of the page, sent because the text the Library returned with the row stops before those words appear, so it does not carry the match and quoting it quotes something else. Use search_items instead when looking for a work by its title, creator or subject.

Input Schema

NameRequiredDescriptionDefault
pageNoWhich page of matches, from 1.
limitNoMatches to return.
queryYesWords 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.
year_toNoLatest year, inclusive.
locationNoThe 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.
year_fromNoEarliest year, inclusive.
publicationNoOne 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_type 'newspapers'.
max_excerpt_charsNoBudget 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_matchNoPassages to keep per match. A page holding the words several times yields several, and the later ones rarely say anything the first did not.

Output Schema

NameRequiredDescriptionDefault
hitsYes
pageYes
notesYes
queryYes
totalYesNewspaper pages that match, not the number returned and not a count of occurrences. Raise 'page' to read further into it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv3.1.0
    • removedOutput schema / properties / hits / items / properties / creator / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / hits / items / properties / creator / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / hits / items / properties / identifier / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / hits / items / properties / identifier / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / hits / items / properties / publication / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / hits / items / properties / publication / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / hits / items / properties / published_on / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / hits / items / properties / published_on / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / hits / items / properties / state / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / hits / items / properties / state / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / hits / items / properties / title / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / hits / items / properties / title / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. Changed7 schema fields changedv2.1.0
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / query / description
      Previous value: -"Words or a quoted phrase, such as '\"cure for influenza\"'."New value: +"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."
    • changedInput schema / properties / query / minLength
      Previous value: -2New value: +1
    • addedOutput schema / properties / hits / items / properties / excerpt_kind
      Added value: +{
      +  "description": "'passage' means the excerpts are the text around the words that matched, centred on them because they were found in the text returned with this row. 'page_opening' means they are the start of the page, sent because that text stops before the searched words appear, so a page_opening does not carry the match.",
      +  "enum": [
      +    "passage",
      +    "page_opening"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / hits / items / properties / excerpts / description
      Previous value: -"Passages as a machine read them off the page."New value: +"Machine-read text off the page, all of the kind 'excerpt_kind' names."
    • removedOutput schema / properties / hits / items / properties / words_located
      Removed value: -{
      -  "description": "True when the searched words were found in the text returned with this row, in which case the excerpts are centred on them. False when they sit further down the page than that text reaches, in which case the excerpts are its opening.",
      -  "type": "boolean"
      -}
    • changedOutput schema / properties / hits / items / required
      Previous value: -[
      -  "identifier",
      -  "title",
      -  "creator",
      -  "year",
      -  "page_number",
      -  "published_on",
      -  "publication",
      -  "state",
      -  "words_located",
      -  "excerpts",
      -  "source_url"
      -]New value: +[
      +  "identifier",
      +  "title",
      +  "creator",
      +  "year",
      +  "page_number",
      +  "published_on",
      +  "publication",
      +  "state",
      +  "excerpt_kind",
      +  "excerpts",
      +  "source_url"
      +]
  3. First observedv1.0.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare the safe-read profile; the description adds substantive behavior beyond that — the quoted-phrase matching is decided by the Library and may return words apart or reordered, 'total' counts pages not occurrences, and unproductive filters are silently dropped with a notice. It also explains 'excerpt_kind' semantics, including the important warning that a 'page_opening' excerpt does not actually contain the match, which prevents a quoting error.

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 the read-vs-catalogue distinction are front-loaded, and nearly every sentence adds operational detail. It is on the long side, and the quotes discussion is slightly repetitive ('Double quotes change how the Library matches' followed by a second sentence restating the unpredictability), which costs it a point but not much more.

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?

With nine parameters, an output schema and an open-world annotation, the remaining risk areas are result interpretation and paging — both addressed ('total' is a page count, 'source_url' opens the leaf, 'excerpt_kind' labels). Nothing an agent needs to call and interpret this tool correctly is missing.

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 coverage is 100%, so the baseline would be 3; the description earns more by explaining how quoting changes matching and why results can vary, and by tying 'location' to the state field on returned matches and 'publication' to the town-and-years naming form. It leaves 'page', 'limit' and the excerpt budget parameters to the schema, which is adequate.

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?

Opens with a specific verb+resource+scope: 'Search the text inside digitised American newspaper pages held by the Library of Congress', then immediately distinguishes it from catalogue search by explaining it reads OCR text rather than titles or records. An agent can tell exactly what this tool returns and why it differs from search_items.

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 routes away: 'Use search_items instead when looking for a work by its title, creator or subject.' It also gives usage conditions for quoting (run both ways), for paging ('ask for page 2, 3 and so on'), and for each filter, plus the notable case that a non-matching filter is dropped rather than erroring.

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