Skip to main content
Glama

libofcongress-mcp-server

Get Newspaper Page

libofcongress_get_newspaper_page
Read-only

Retrieve the full OCR text of a specific historical newspaper page along with publication metadata — newspaper title, issue date, place of publication, indexed states, edition, the page's sequence, and the issue's page count. Pass the url field from a libofcongress_search_newspapers result — do not construct this URL manually. OCR quality varies by digitization batch and era: 19th-century and degraded materials may contain fragmented text, garbled words, and line-break artifacts that are surfaced as-is. When a page exists but has no digitized text, ocr_available is false and ocr_text is empty — this is a data property, not an error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_urlYesThe url field from a libofcongress_search_newspapers result (e.g., "https://www.loc.gov/resource/sn83045462/1905-03-15/ed-1/seq-1/"). Always pass the value directly from search results — do not construct or modify this URL.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNoIssue publication date (YYYY-MM-DD).
errorNoPresent when the call failed. Absent on success.
noticeNoSet when ocr_available is true but ocr_text is empty — the page has digitized OCR, but the text service did not return it this call. Distinguishes a transient retrieval miss from a genuinely image-only page (where ocr_available is false). Absent when OCR text was returned or the page has no OCR.
statesNoEvery US state LOC indexes this newspaper title under (e.g., ["georgia", "south carolina"]), in LOC order — possibly more than the state of publication. Absent when LOC lists no state.
editionNoEdition number of the issue (e.g., "1"). Absent when LOC gives none.
ocr_textNoFull plain-text OCR content for the page. Empty string when ocr_available is false. May contain fragmented words, line-break artifacts, and misspellings inherent to historical OCR — do not attempt to repair.
page_urlNoThe LOC resource URL for this newspaper page.
sequenceNoPage sequence number within the issue.
ocr_availableNoTrue when digitized OCR text exists for this page. False for image-only digitization batches where OCR has not been applied.
segment_countNoNumber of pages in the issue. Absent when LOC gives none.
newspaper_titleNoTitle of the newspaper publication. Absent when LOC gives none.
place_of_publicationNoWhere the newspaper was published, as LOC catalogs it (e.g., "Charleston, S.C."). Absent when LOC gives none.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • changedOutput schema / properties / date / description
      Previous value: -"Issue publication date."New value: +"Issue publication date (YYYY-MM-DD)."
    • changedOutput schema / properties / edition / description
      Previous value: -"Edition or publication context identifier."New value: +"Edition number of the issue (e.g., \"1\"). Absent when LOC gives none."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `page_not_found`: The URL does not resolve to a valid LOC newspaper page resource. `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_page_url`: page_url does not begin with https://www.loc.gov/resource/. `page_not_found`: The URL does not resolve to a valid LOC newspaper page resource. `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: -[
      -  "page_not_found",
      -  "rate_limit_exceeded"
      -]New value: +[
      +  "invalid_page_url",
      +  "page_not_found",
      +  "rate_limit_exceeded"
      +]
    • changedOutput schema / properties / newspaper_title / description
      Previous value: -"Title of the newspaper publication."New value: +"Title of the newspaper publication. Absent when LOC gives none."
    • addedOutput schema / properties / place_of_publication
      Added value: +{
      +  "description": "Where the newspaper was published, as LOC catalogs it (e.g., \"Charleston, S.C.\"). Absent when LOC gives none.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / segment_count
      Added value: +{
      +  "description": "Number of pages in the issue. Absent when LOC gives none.",
      +  "type": "number"
      +}
    • removedOutput schema / properties / state
      Removed value: -{
      -  "description": "State where the newspaper was published.",
      -  "type": "string"
      -}
    • addedOutput schema / properties / states
      Added value: +{
      +  "description": "Every US state LOC indexes this newspaper title under (e.g., [\"georgia\", \"south carolina\"]), in LOC order — possibly more than the state of publication. Absent when LOC lists no state.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

The description discloses OCR quality variability across digitization batches and eras, including specific artifacts like fragmented text and garbled words, and clarifies that an empty ocr_text with ocr_available=false is a data property, not an error. These details go well beyond the readOnlyHint and openWorldHint annotations, giving the agent realistic expectations about output quality and error semantics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences, front-loaded with the primary action, then usage instruction, then behavioral caveats. Every sentence earns its place, there is no filler, and the structure flows logically from purpose to invocation to expected variability.

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?

For a single-parameter retrieval tool with an output schema already present, the description covers everything an agent needs: what it returns, how to obtain the required URL, and how to interpret two important edge cases (degraded OCR and missing text). No critical gap remains.

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%, and the schema already documents page_url thoroughly, including an example and the directive to pass it unchanged. The tool description repeats that directive almost verbatim but adds no new semantic detail beyond what the schema states. Baseline 3 applies because the schema carries the full meaning and the description reinforces without extending it.

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?

The description opens with a clear verb and resource: 'Retrieve the full OCR text of a specific historical newspaper page' plus a detailed list of the metadata returned. It is unambiguously a fetch-a-page tool and is distinct from siblings like libofcongress_get_item (generic item) and libofcongress_search_newspapers (search). The instruction to use the url field from a search result anchors its role in the workflow.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly instructs the agent to pass the url field from libofcongress_search_newspapers and warns not to construct it manually. This gives a clear context for when the tool should be invoked. It does not explicitly name alternatives or state when not to use it, but the workflow implication is strong and the sibling tools are distinct enough that an agent can infer the right choice.

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.