Skip to main content
Glama

libofcongress-mcp-server

Search Historical Newspapers

libofcongress_search_newspapers
Read-only

Search historical newspaper pages in the Chronicling America corpus. Returns matching pages with the opening of each page's OCR text (~500 characters), publication title, date, the states LOC indexes the title under, and the page URL needed for libofcongress_get_newspaper_page. Filters by keyword, date range, US state, and newspaper title. The excerpt is the page's first lines, not the text around the match: to read where the query occurs, call libofcongress_get_newspaper_page with the returned url field and this query as its match, which returns the passages around each occurrence; omit match for the full page text. OCR quality varies: 19th-century and degraded materials may contain fragmented or garbled text.

Input Schema

NameRequiredDescriptionDefault
pageNo1-indexed page number for paginating results.
limitNoResults per page. Default 25. A page holds at most 100 results: a larger limit (up to 1000) is served as a 100-result page, and page then counts 100-result pages.
queryYesKeyword search across OCR text and newspaper metadata.
stateNoFilter to newspapers LOC indexes under this US state: the full state name (e.g., "oklahoma", "new york") or its two-letter postal code (e.g., "OK", "NY"), case-insensitive. Use "district of columbia" (or "DC") for Washington, D.C.; "washington" means Washington state. City and county names match nothing.
date_endNoEnd of the date filter, inclusive, in the same forms as date_start (e.g., 1920 or "1912-04-16"). A year or month ends on its last day, so "1912-04" runs through April 30. Omit to run through the current year.
date_startNoStart of the date filter, inclusive: an integer year (e.g., 1900) or a "YYYY", "YYYY-MM", or "YYYY-MM-DD" string (e.g., "1912-04-15"); month and day may be one or two digits. A year or month starts on its first day. Omit for no lower bound.
newspaper_titleNoFilter to one newspaper. Pass the newspaper_title value of a libofcongress_search_newspapers result exactly (case-insensitive), e.g., "new-york tribune (new york [n.y.]) 1866-1924" — the full catalog title with place and run. A shortened title such as "New-York Tribune" matches nothing.

Output Schema

NameRequiredDescriptionDefault
pageNoCurrent 1-indexed page number.
errorNoPresent when the call failed. Absent on success.
itemsNoNewspaper page results matching the search query and filters.
pagesNoTotal retrievable pages. For result sets larger than LOC will page through (~100,000 pages) this is capped, and a notice discloses how to reach the rest (partition by date/state).
totalNoTotal number of matching newspaper pages in the result set.
noticeNoRecovery hint when results are empty or a page is out of range — echoes applied filters and suggests how to broaden — plus disclosure of a capped limit or of the retrieval ceiling. Absent on ordinary result pages.
has_nextNoTrue when a retrievable next page follows this one. Never promises a page past LOC's ~100,000-item retrieval ceiling.
totalCountNoTotal matching newspaper pages — mirrors output.total for agent reasoning.
effectiveLimitNoThe page size actually served when limit exceeded the per-call cap of 100. Absent when limit was within the cap.
effectiveQueryNoThe keyword query as submitted to the Chronicling America API, after trimming.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / items / items / properties / description / description
      Previous value: -"OCR text excerpt (~500 chars) for relevance assessment."New value: +"Opening of the page's OCR text (~500 chars): the page's first lines, not the text around the match. Pass the query as match to libofcongress_get_newspaper_page for the passages around it."
    • changedOutput schema / properties / items / items / properties / url / description
      Previous value: -"LOC resource URL for this page — pass to libofcongress_get_newspaper_page to get full OCR text."New value: +"LOC resource URL for this page — pass to libofcongress_get_newspaper_page for its full OCR text, or with the query as match for the passages around it."
  2. Changed19 schema fields changed
    • addedInput schema / properties / date_end / anyOf
      Added value: +[
      +  {
      +    "description": "A year, e.g., 1912.",
      +    "maximum": 9007199254740991,
      +    "minimum": -9007199254740991,
      +    "type": "integer"
      +  },
      +  {
      +    "description": "A date: \"YYYY\", \"YYYY-MM\", or \"YYYY-MM-DD\", e.g., \"1912-04-16\".",
      +    "pattern": "^(\\d{4})(?:-(\\d{1,2})(?:-(\\d{1,2}))?)?$",
      +    "type": "string"
      +  },
      +  {
      +    "const": "",
      +    "type": "string"
      +  }
      +]
    • changedInput schema / properties / date_end / description
      Previous value: -"End year for date filter, inclusive (e.g., 1920). Omit for no upper bound."New value: +"End of the date filter, inclusive, in the same forms as date_start (e.g., 1920 or \"1912-04-16\"). A year or month ends on its last day, so \"1912-04\" runs through April 30. Omit to run through the current year."
    • removedInput schema / properties / date_end / maximum
      Removed value: -9007199254740991
    • removedInput schema / properties / date_end / minimum
      Removed value: --9007199254740991
    • removedInput schema / properties / date_end / type
      Removed value: -"integer"
    • addedInput schema / properties / date_start / anyOf
      Added value: +[
      +  {
      +    "description": "A year, e.g., 1912.",
      +    "maximum": 9007199254740991,
      +    "minimum": -9007199254740991,
      +    "type": "integer"
      +  },
      +  {
      +    "description": "A date: \"YYYY\", \"YYYY-MM\", or \"YYYY-MM-DD\", e.g., \"1912-04-16\".",
      +    "pattern": "^(\\d{4})(?:-(\\d{1,2})(?:-(\\d{1,2}))?)?$",
      +    "type": "string"
      +  },
      +  {
      +    "const": "",
      +    "type": "string"
      +  }
      +]
    • changedInput schema / properties / date_start / description
      Previous value: -"Start year for date filter, inclusive (e.g., 1900). Omit for no lower bound."New value: +"Start of the date filter, inclusive: an integer year (e.g., 1900) or a \"YYYY\", \"YYYY-MM\", or \"YYYY-MM-DD\" string (e.g., \"1912-04-15\"); month and day may be one or two digits. A year or month starts on its first day. Omit for no lower bound."
    • removedInput schema / properties / date_start / maximum
      Removed value: -9007199254740991
    • removedInput schema / properties / date_start / minimum
      Removed value: --9007199254740991
    • removedInput schema / properties / date_start / type
      Removed value: -"integer"
    • changedInput schema / properties / limit / description
      Previous value: -"Results per page. Default 25, max 100."New value: +"Results per page. Default 25. A page holds at most 100 results: a larger limit (up to 1000) is served as a 100-result page, and page then counts 100-result pages."
    • changedInput schema / properties / limit / maximum
      Previous value: -100New value: +1000
    • changedInput schema / properties / newspaper_title / description
      Previous value: -"Filter to a specific newspaper by title (partial match accepted)."New value: +"Filter to one newspaper. Pass the newspaper_title value of a libofcongress_search_newspapers result exactly (case-insensitive), e.g., \"new-york tribune (new york [n.y.]) 1866-1924\" — the full catalog title with place and run. A shortened title such as \"New-York Tribune\" matches nothing."
    • changedInput schema / properties / state / description
      Previous value: -"Filter to newspapers published in this US state. Use the full state name, lowercase (e.g., \"oklahoma\", \"new york\")."New value: +"Filter to newspapers LOC indexes under this US state: the full state name (e.g., \"oklahoma\", \"new york\") or its two-letter postal code (e.g., \"OK\", \"NY\"), case-insensitive. Use \"district of columbia\" (or \"DC\") for Washington, D.C.; \"washington\" means Washington state. City and county names match nothing."
    • addedOutput schema / properties / effectiveLimit
      Added value: +{
      +  "description": "The page size actually served when limit exceeded the per-call cap of 100. Absent when limit was within the cap.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `invalid_date_range`: date_start is later than date_end. `rate_limit_exceeded`: LOC API rate limit exceeded; requests are blocked for approximately 1 hour. `server_busy`: More Library of Congress requests are queued on this server than can start within this call's time budget. `request_timed_out`: The Library of Congress did not respond within the 50-second request budget. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_date`: date_start or date_end names no calendar day: a month outside 01-12, or a day past the end of its month (e.g., \"1912-02-30\"). `invalid_date_range`: date_start is later than date_end, or date_start is given alone and is later than the current year. `rate_limit_exceeded`: LOC API rate limit exceeded; requests are blocked for approximately 1 hour. `server_busy`: More Library of Congress requests are queued on this server than can start within this call's time budget. `request_timed_out`: The Library of Congress did not respond within the 50-second request budget. `upstream_unavailable`: The Library of Congress could not be reached, or answered with an error status, a bot challenge or other HTML page, or an unreadable response instead of its JSON. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "invalid_date_range",
      -  "rate_limit_exceeded",
      -  "server_busy",
      -  "request_timed_out"
      -]New value: +[
      +  "invalid_date",
      +  "invalid_date_range",
      +  "rate_limit_exceeded",
      +  "server_busy",
      +  "request_timed_out",
      +  "upstream_unavailable"
      +]
    • changedOutput schema / properties / items / items / properties / newspaper_title / description
      Previous value: -"Newspaper publication title."New value: +"The newspaper's full catalog title with place and run (e.g., \"the seattle star (seattle, wash.) 1899-1947\"). Pass it unchanged as newspaper_title to search only this paper."
    • changedOutput schema / properties / notice / description
      Previous value: -"Recovery hint when results are empty or a page is out of range — echoes applied filters and suggests how to broaden. Absent on successful result pages."New value: +"Recovery hint when results are empty or a page is out of range — echoes applied filters and suggests how to broaden — plus disclosure of a capped limit or of the retrieval ceiling. Absent on ordinary result pages."
  3. Changed2 schema fields changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `invalid_date_range`: date_start is later than date_end. `rate_limit_exceeded`: LOC API rate limit exceeded; requests are blocked for approximately 1 hour. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_date_range`: date_start is later than date_end. `rate_limit_exceeded`: LOC API rate limit exceeded; requests are blocked for approximately 1 hour. `server_busy`: More Library of Congress requests are queued on this server than can start within this call's time budget. `request_timed_out`: The Library of Congress did not respond within the 50-second request budget. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "invalid_date_range",
      -  "rate_limit_exceeded"
      -]New value: +[
      +  "invalid_date_range",
      +  "rate_limit_exceeded",
      +  "server_busy",
      +  "request_timed_out"
      +]
  4. Changed4 schema fields changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `rate_limit_exceeded`: LOC API rate limit exceeded; requests are blocked for approximately 1 hour. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_date_range`: date_start is later than date_end. `rate_limit_exceeded`: LOC API rate limit exceeded; requests are blocked for approximately 1 hour. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "rate_limit_exceeded"
      -]New value: +[
      +  "invalid_date_range",
      +  "rate_limit_exceeded"
      +]
    • removedOutput schema / properties / items / items / properties / state
      Removed value: -{
      -  "description": "State where the newspaper was published.",
      -  "type": "string"
      -}
    • addedOutput schema / properties / items / items / properties / states
      Added value: +{
      +  "description": "Every US state LOC indexes this newspaper title under (e.g., [\"georgia\", \"south carolina\"]), in LOC order. A title indexed against its circulation area lists several, so no entry is necessarily the place of publication — libofcongress_get_newspaper_page returns place_of_publication. Absent when LOC lists no state.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  5. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations cover only readOnlyHint and openWorldHint, and the description adds substantially more: it enumerates the returned fields, warns that the ~500-char excerpt is the page opening rather than text around the match, and flags that 19th-century/degraded OCR may be fragmented or garbled. These are behavioral traits an agent cannot derive from the annotations.

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?

Front-loaded with purpose and returns before the routing advice and the OCR caveat, and each sentence carries distinct information. It runs long at roughly five sentences, but nothing is redundant with the structured fields except the brief filter enumeration.

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?

Despite an output schema existing, the description supplies the practical context an agent needs: what the excerpt actually is, how to follow up for in-context text, and the OCR reliability caveat. Filtering, pagination, and return shape are all accounted for across description, schema, and output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter (state matching rules, date forms, exact newspaper_title, page/limit pagination) is already fully documented in the schema. The description only restates that filtering exists by keyword, date range, state, and title, adding no syntax or edge-case detail beyond the schema.

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 (Search) and resource (historical newspaper pages in the Chronicling America corpus), and explicitly distinguishes itself from libofcongress_get_newspaper_page by naming that sibling and its role. An agent can tell it apart from the other search/browse siblings without opening a schema.

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?

Gives explicit routing: use libofcongress_get_newspaper_page with the returned url field and the same query as match to see passages around the hit, or omit match for full page text. It also explains why this tool's excerpt is insufficient for that purpose, so the when-to-use-this vs. when-to-use-the-alternative decision is unambiguous.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.