Servidor MCP

libofcongress-mcp-server

io.github.cyanheads/libofcongress-mcp-server

Qué hace este MCP

Searches Library of Congress digital collections, historical newspaper OCR, and controlled subject headings, and retrieves item metadata.

libofcongress_browse_collections
Browse LOC Collections
List and browse Library of Congress curated digital collections. Returns collection names, descriptions, item counts, slugs, and URLs. Optionally filter by keyword. Collections are curated subsets of the digital holdings with specific focuses (e.g., "Civil War Glass Negatives", "Baseball Cards", "WPA Posters"). Use the returned URL to navigate directly to a collection on loc.gov.
Solo lectura Acceso externo
Esquema de entrada
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'page': {'type': 'integer', 'default': 1, 'maximum': 9007199254740991, 'minimum': 1, 'description': '1-indexed page number for paginating results.'}, 'limit': {'type': 'integer', 'default': 25, 'maximum': 100, 'minimum': 1, 'description': 'Maximum number of collections to return. Default 25, max 100.'}, 'query': {'type': 'string', 'description': 'Optional keyword to filter collections by name or description. Omit to list all collections.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['collections', 'total', 'page', 'pages', 'has_next', 'totalCount']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'page': {'type': 'number', 'description': 'Current 1-indexed page number.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['rate_limit_exceeded'], 'description': '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.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'pages': {'type': 'number', 'description': 'Total number of pages available.'}, 'total': {'type': 'number', 'description': 'Total number of matching collections across all pages.'}, 'notice': {'type': 'string', 'description': 'Recovery hint when results are empty or a page is out of range â\x80\x94 suggests broadening the keyword or removing filters. Absent on successful result pages.'}, 'has_next': {'type': 'boolean', 'description': 'True when more pages are available after this one.'}, 'totalCount': {'type': 'number', 'description': 'Total matching collections â\x80\x94 mirrors output.total for agent reasoning.'}, 'collections': {'type': 'array', 'items': {'type': 'object', 'required': ['slug', 'title', 'url'], 'properties': {'url': {'type': 'string', 'description': 'Collection URL on loc.gov.'}, 'slug': {'type': 'string', 'description': 'Collection URL slug â\x80\x94 identifies the collection within loc.gov URLs.'}, 'title': {'type': 'string', 'description': 'Collection name.'}, 'item_count': {'type': 'number', 'description': 'Approximate number of items in this collection. Omitted when unavailable.'}, 'description': {'type': 'string', 'description': "Description of the collection's scope and contents."}}, 'description': 'A single LOC curated digital collection.', 'additionalProperties': False}, 'description': 'LOC curated collections matching the keyword filter, or all collections when no keyword is specified.'}}, 'additionalProperties': False}
libofcongress_get_item
Get LOC Item
Retrieve the full metadata record for a specific LOC digital item. Returns contributors, subjects, summary, languages, locations, rights information, physical description, call number, original and online formats, access restrictions, former catalog IDs, notes, related items, and links to digital resources (TIFF, JPEG, PDF) for items with digital surrogates. Use after libofcongress_search on a result whose is_item is true. Pass the result id verbatim — it may be a simple ID or a slash-separated newspaper path; do not prepend the loc.gov URL. Non-item results (is_item: false) — collections, exhibits, guides, newspaper pages — have no item record and cannot be retrieved here.
Solo lectura Acceso externo
Esquema de entrada
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['item_id'], 'properties': {'item_id': {'type': 'string', 'minLength': 1, 'description': 'LOC item id from a libofcongress_search result\'s "id" field (where is_item is true). A simple ID ("2009632251", "2005691065") or a slash-separated path for newspaper pages ("sn95047246/1935-09-05/ed-1"). Pass the id verbatim; do not prepend the loc.gov URL or an "item/" prefix.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['item_id', 'title', 'contributors', 'subject_headings', 'notes', 'languages', 'locations', 'former_ids', 'original_formats', 'online_formats', 'resource_links', 'related_items', 'url']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'url': {'type': 'string', 'description': 'Canonical LOC item URL.'}, 'date': {'type': 'string', 'description': 'Publication or creation date.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['item_not_found', 'rate_limit_exceeded'], 'description': 'Machine-readable failure mode. Declared by this tool: `item_not_found`: No item exists for the given ID. `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.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'notes': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Descriptive notes and annotations from catalogers.'}, 'title': {'type': 'string', 'description': 'Item title.'}, 'item_id': {'type': 'string', 'description': 'LOC item ID as resolved by the service (matches the input item_id).'}, 'summary': {'type': 'string', 'description': "Cataloger's abstract of the item's subject and historical context."}, 'languages': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Languages of the item (e.g., "english").'}, 'locations': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Places the item depicts or originates from (e.g., "united states").'}, 'former_ids': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Superseded catalog identifiers or URLs this item was previously known by.'}, 'call_number': {'type': 'string', 'description': 'LOC call number â\x80\x94 the shelf location for requesting the physical original.'}, 'contributors': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Contributors, creators, or photographers as LOC catalogs them, role included (e.g., "Washington, George, 1732-1799 (Author)"). One person can appear once per role. Empty when LOC lists none.'}, 'related_items': {'type': 'array', 'items': {'type': 'string'}, 'description': 'IDs or URLs of related LOC records for follow-up retrieval; a title stands in for a related record LOC gives neither for.'}, 'online_formats': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Formats the digitized surrogate is available in (e.g., "image").'}, 'resource_links': {'type': 'array', 'items': {'type': 'string'}, 'description': 'URLs to downloadable digital files (TIFF, JPEG, PDF). Empty when no digital surrogate exists.'}, 'original_formats': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Material types of the original (e.g., "photo, print, drawing").'}, 'subject_headings': {'type': 'array', 'items': {'type': 'string'}, 'description': 'LCSH subject headings assigned to this item.'}, 'access_restricted': {'type': 'boolean', 'description': 'True when LOC restricts access to the original. Absent when upstream omits it.'}, 'rights_information': {'type': 'string', 'description': 'Rights and reproduction statement for this item.'}, 'physical_description': {'type': 'string', 'description': 'Physical or technical description of the original item.'}}, 'additionalProperties': False}
libofcongress_get_newspaper_page
Get Newspaper Page
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.
Solo lectura Acceso externo
Esquema de entrada
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['page_url'], 'properties': {'page_url': {'type': 'string', 'description': 'The 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 â\x80\x94 do not construct or modify this URL.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['page_url', 'ocr_text', 'ocr_available']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'date': {'type': 'string', 'description': 'Issue publication date (YYYY-MM-DD).'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['invalid_page_url', 'page_not_found', 'rate_limit_exceeded'], 'description': '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.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'notice': {'type': 'string', 'description': 'Set when ocr_available is true but ocr_text is empty â\x80\x94 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.'}, 'states': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Every US state LOC indexes this newspaper title under (e.g., ["georgia", "south carolina"]), in LOC order â\x80\x94 possibly more than the state of publication. Absent when LOC lists no state.'}, 'edition': {'type': 'string', 'description': 'Edition number of the issue (e.g., "1"). Absent when LOC gives none.'}, 'ocr_text': {'type': 'string', 'description': 'Full 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 â\x80\x94 do not attempt to repair.'}, 'page_url': {'type': 'string', 'description': 'The LOC resource URL for this newspaper page.'}, 'sequence': {'type': 'number', 'description': 'Page sequence number within the issue.'}, 'ocr_available': {'type': 'boolean', 'description': 'True when digitized OCR text exists for this page. False for image-only digitization batches where OCR has not been applied.'}, 'segment_count': {'type': 'number', 'description': 'Number of pages in the issue. Absent when LOC gives none.'}, 'newspaper_title': {'type': 'string', 'description': 'Title of the newspaper publication. Absent when LOC gives none.'}, 'place_of_publication': {'type': 'string', 'description': 'Where the newspaper was published, as LOC catalogs it (e.g., "Charleston, S.C."). Absent when LOC gives none.'}}, 'additionalProperties': False}
libofcongress_search
Search LOC Collections
Search the Library of Congress digital collections by keyword. Optionally filter by material format (photos, maps, newspapers, audio, etc.), date range, subject heading, or geographic location, or scope the search to a single curated collection with collection_slug. Returns item summaries with titles, dates, descriptions, LOC IDs, and format tags. Each result carries is_item: pass the id of a result where is_item is true to libofcongress_get_item for full metadata; results where is_item is false are non-item resources (collections, exhibit and research-guide pages, newspaper-page results) with no item record — open their url instead. Use libofcongress_search_subjects first to find the exact LCSH heading spelling before applying a subject filter.
Solo lectura Acceso externo
Esquema de entrada
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['query'], 'properties': {'page': {'type': 'integer', 'default': 1, 'maximum': 9007199254740991, 'minimum': 1, 'description': '1-indexed page number for paginating results.'}, 'limit': {'type': 'integer', 'default': 25, 'maximum': 100, 'minimum': 1, 'description': 'Results per page. Default 25, max 100.'}, 'query': {'type': 'string', 'minLength': 1, 'description': 'Full-text search across metadata and available descriptive text.'}, 'format': {'enum': ['photo', 'map', 'newspaper', 'manuscript', 'audio', 'film', 'book', 'notated-music'], 'type': 'string', 'description': 'Material type filter. Options: photo, map, newspaper, manuscript, audio, film, book, notated-music. Omit to search all formats.'}, 'subject': {'type': 'string', 'description': 'Subject heading filter. Use the exact label from libofcongress_search_subjects results for best precision. Example: "World War, 1939-1945".'}, 'date_end': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'End year for date filter, inclusive (e.g., 1930). Omit for no upper bound.'}, 'location': {'type': 'string', 'description': 'Geographic location filter (e.g., "oklahoma", "washington d.c."). Lowercase, matches LOC location facets.'}, 'date_start': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'Start year for date filter, inclusive (e.g., 1920). Omit for no lower bound.'}, 'collection_slug': {'type': 'string', 'description': 'Scope the search to one curated collection. Use a slug exactly as returned by libofcongress_browse_collections (e.g., "aaron-copland") â\x80\x94 slugs are not derivable from the collection title. Cannot be combined with format; omit format and read each result\'s format field instead. Omit to search all of LOC.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['items', 'total', 'page', 'pages', 'has_next', 'effectiveQuery', 'totalCount']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'page': {'type': 'number', 'description': 'Current 1-indexed page number.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['invalid_date_range', 'incompatible_filters', 'collection_not_found', 'rate_limit_exceeded'], 'description': 'Machine-readable failure mode. Declared by this tool: `invalid_date_range`: date_start is later than date_end. `incompatible_filters`: format and collection_slug were both supplied; each selects a different LOC endpoint, so only one can apply. `collection_not_found`: collection_slug does not resolve to a LOC collection. Reported on page 1; a later page gets the out-of-range notice, since LOC answers both cases the same way there. `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.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'items': {'type': 'array', 'items': {'type': 'object', 'required': ['id', 'title', 'is_item', 'url'], 'properties': {'id': {'type': 'string', 'description': 'LOC identifier for this result. When is_item is true, pass it to libofcongress_get_item for full metadata. When is_item is false it is a non-item resource (a collection, exhibit, guide, or newspaper page), not a get_item input â\x80\x94 open url instead.'}, 'url': {'type': 'string', 'description': 'LOC item or collection URL.'}, 'date': {'type': 'string', 'description': 'Publication or creation date.'}, 'title': {'type': 'string', 'description': 'Item title.'}, 'format': {'type': 'string', 'description': 'Material format (e.g., photo, map, manuscript, collection).'}, 'is_item': {'type': 'boolean', 'description': 'True when this result is a catalog item whose id resolves through libofcongress_get_item. False for collections, exhibits, research guides, newspaper pages, and other non-item results, which have no get_item record â\x80\x94 follow url instead. Always present on every result.'}, 'description': {'type': 'string', 'description': 'Brief description or summary.'}}, 'description': 'A single LOC item summary.', 'additionalProperties': False}, 'description': 'Item summaries matching the search query and filters.'}, 'pages': {'type': 'number', 'description': 'Total retrievable pages. For result sets larger than LOC will page through (~100,000 items) this is capped, and a notice discloses how to reach the rest (partition by date/subject/location).'}, 'total': {'type': 'number', 'description': 'Total number of matching items across all pages.'}, 'notice': {'type': 'string', 'description': 'Recovery hint when results are empty or a page is out of range â\x80\x94 echoes applied filters and suggests how to broaden. Absent on successful result pages.'}, 'has_next': {'type': 'boolean', 'description': "True when a retrievable next page follows this one. Never promises a page past LOC's ~100,000-item retrieval ceiling."}, 'totalCount': {'type': 'number', 'description': 'Total matching items across all pages â\x80\x94 mirrors output.total for agent reasoning.'}, 'effectiveQuery': {'type': 'string', 'description': 'The query as submitted to the LOC API, after trimming.'}, 'effectiveCollectionSlug': {'type': 'string', 'description': 'The collection the search was scoped to, after trimming. Absent when the search covered all of LOC.'}}, 'additionalProperties': False}
libofcongress_search_newspapers
Search Historical Newspapers
Search historical newspaper pages in the Chronicling America corpus. Returns matching pages with OCR text excerpts (~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 OCR excerpts are sufficient for relevance assessment — call libofcongress_get_newspaper_page with the returned url field to read the full page text. OCR quality varies: 19th-century and degraded materials may contain fragmented or garbled text.
Solo lectura Acceso externo
Esquema de entrada
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['query'], 'properties': {'page': {'type': 'integer', 'default': 1, 'maximum': 9007199254740991, 'minimum': 1, 'description': '1-indexed page number for paginating results.'}, 'limit': {'type': 'integer', 'default': 25, 'maximum': 100, 'minimum': 1, 'description': 'Results per page. Default 25, max 100.'}, 'query': {'type': 'string', 'minLength': 1, 'description': 'Keyword search across OCR text and newspaper metadata.'}, 'state': {'type': 'string', 'description': 'Filter to newspapers published in this US state. Use the full state name, lowercase (e.g., "oklahoma", "new york").'}, 'date_end': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'End year for date filter, inclusive (e.g., 1920). Omit for no upper bound.'}, 'date_start': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'Start year for date filter, inclusive (e.g., 1900). Omit for no lower bound.'}, 'newspaper_title': {'type': 'string', 'description': 'Filter to a specific newspaper by title (partial match accepted).'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['items', 'total', 'page', 'pages', 'has_next', 'effectiveQuery', 'totalCount']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'page': {'type': 'number', 'description': 'Current 1-indexed page number.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['invalid_date_range', 'rate_limit_exceeded'], 'description': '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.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'items': {'type': 'array', 'items': {'type': 'object', 'required': ['url', 'title'], 'properties': {'url': {'type': 'string', 'description': 'LOC resource URL for this page â\x80\x94 pass to libofcongress_get_newspaper_page to get full OCR text.'}, 'date': {'type': 'string', 'description': 'Issue publication date.'}, 'title': {'type': 'string', 'description': 'Page or issue title.'}, 'states': {'type': 'array', 'items': {'type': 'string'}, '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 â\x80\x94 libofcongress_get_newspaper_page returns place_of_publication. Absent when LOC lists no state.'}, 'description': {'type': 'string', 'description': 'OCR text excerpt (~500 chars) for relevance assessment.'}, 'newspaper_title': {'type': 'string', 'description': 'Newspaper publication title.'}}, 'description': 'A single newspaper page search result.', 'additionalProperties': False}, 'description': 'Newspaper page results matching the search query and filters.'}, 'pages': {'type': 'number', 'description': 'Total 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).'}, 'total': {'type': 'number', 'description': 'Total number of matching newspaper pages in the result set.'}, 'notice': {'type': 'string', 'description': 'Recovery hint when results are empty or a page is out of range â\x80\x94 echoes applied filters and suggests how to broaden. Absent on successful result pages.'}, 'has_next': {'type': 'boolean', 'description': "True when a retrievable next page follows this one. Never promises a page past LOC's ~100,000-item retrieval ceiling."}, 'totalCount': {'type': 'number', 'description': 'Total matching newspaper pages â\x80\x94 mirrors output.total for agent reasoning.'}, 'effectiveQuery': {'type': 'string', 'description': 'The keyword query as submitted to the Chronicling America API, after trimming.'}}, 'additionalProperties': False}
libofcongress_search_subjects
Search LC Subject Headings
Search Library of Congress Subject Headings (LCSH) by keyword. Returns controlled-vocabulary subject labels and their URIs. Use the returned label as the subject filter in libofcongress_search — LCSH uses precise, standardized terms that differ from natural language (e.g., "World War, 1939-1945" not "World War II"; "Photography, Aerial" not "Aerial photography"). Running this tool before a subject-filtered libofcongress_search dramatically improves result quality.
Solo lectura Acceso externo
Esquema de entrada
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['query'], 'properties': {'limit': {'type': 'integer', 'default': 10, 'maximum': 50, 'minimum': 1, 'description': 'Maximum number of subject headings to return. Default 10, max 50.'}, 'query': {'type': 'string', 'minLength': 1, 'description': 'Keyword or partial subject heading to search for (e.g., "civil war", "immigration", "jazz").'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['subjects', 'total', 'effectiveQuery']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'cap': {'type': 'number', 'description': 'The limit applied to this response â\x80\x94 maximum headings the API will return.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'description': 'Machine-readable failure mode.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'shown': {'type': 'number', 'description': 'Number of subject headings returned in this response.'}, 'total': {'type': 'number', 'description': 'Number of subject headings returned.'}, 'notice': {'type': 'string', 'description': 'Recovery hint when results are empty, or when the upstream candidate cap under-filled the request. Distinguishes "exhausted by ranking" (retry with a more specific query) from "no LCSH coverage", and suggests inverted-form strategies. Absent when the full requested set was returned.'}, 'subjects': {'type': 'array', 'items': {'type': 'object', 'required': ['label', 'uri'], 'properties': {'uri': {'type': 'string', 'description': 'Stable LOC URI identifying this subject heading in the authority file.'}, 'label': {'type': 'string', 'description': 'Standardized LCSH heading â\x80\x94 use this exact string in the libofcongress_search subject filter.'}}, 'description': 'A single LCSH subject heading record.', 'additionalProperties': False}, 'description': 'LCSH subject headings matching the query, ordered by relevance. To see how many LOC items carry a heading, pass its label as the libofcongress_search subject filter and read total.'}, 'truncated': {'type': 'boolean', 'description': 'True when results were capped at the requested limit. Increase limit or refine the query to surface additional headings.'}, 'effectiveQuery': {'type': 'string', 'description': 'The keyword query as submitted to the id.loc.gov suggest endpoint, after trimming.'}}, 'additionalProperties': False}
Modificado
libofcongress_search_subjects
24 de September de 2026 a las 02:40
Modificado
libofcongress_get_newspaper_page
24 de September de 2026 a las 02:40
Modificado
libofcongress_search_newspapers
24 de September de 2026 a las 02:40
Modificado
libofcongress_get_item
24 de September de 2026 a las 02:40
Modificado
libofcongress_search
24 de September de 2026 a las 02:40
Añadido
libofcongress_browse_collections
20 de September de 2026 a las 02:40
Añadido
libofcongress_search_subjects
20 de September de 2026 a las 02:40
Añadido
libofcongress_get_newspaper_page
20 de September de 2026 a las 02:40
Añadido
libofcongress_search_newspapers
20 de September de 2026 a las 02:40
Añadido
libofcongress_get_item
20 de September de 2026 a las 02:40
Añadido
libofcongress_search
20 de September de 2026 a las 02:40