Skip to main content
Glama
smeet666

mcp-libraryofcongress

Search inside scanned newspaper pages

search_newspapers
Read-onlyIdempotent

Search the full text of digitized American newspaper pages from the Library of Congress. Filter by state, publication, and year to locate specific phrases and events.

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

TableJSON 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

TableJSON 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.
Behavior5/5

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

Despite strong annotations (readOnlyHint, openWorldHint, idempotentHint), the description adds substantial behavioral context: quote semantics vary, 'total' counts pages not occurrences, unmatched filters are silently dropped, and the page_opening excerpt quirk is explained. No contradiction with 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?

The description is front-loaded with the core purpose and then builds with related behavioral details. It is long, but most sentences earn their place; minor awkwardness like 'and they page' prevents a perfect score.

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?

Given the 9-parameter search tool with output schema and annotations, the description is remarkably complete. It covers pagination, filter behavior, return fields, excerpt types, result-count semantics, and when to use an alternative tool, leaving little unaddressed.

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 baseline is 3. The description adds meaning beyond the schema by explaining quote behavior, the meaning of 'location', 'publication', 'year_from/year_to', and the semantics of 'total' and pagination, going beyond the raw parameter descriptions.

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 uses a specific verb and resource: 'Search the text inside digitised American newspaper pages held by the Library of Congress.' It clearly distinguishes from siblings by explaining this is full-text search of OCR content, and explicitly contrasts with 'search_items' for title/creator/subject searches.

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?

Provides explicit when-to-use guidance: full-text newspaper search when the phrase may not appear in catalog records, and 'Use search_items instead when looking for a work by its title, creator or subject.' It also gives practical guidance on double-quote behavior, pagination, and filter usage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/smeet666/mcp-libraryofcongress'

If you have feedback or need assistance with the MCP directory API, please join our Discord server