Skip to main content
Glama

libofcongress-mcp-server

Get LOC Item

libofcongress_get_item
Read-only

Retrieve the full metadata record for a specific LOC digital item. Returns the imprint (place, publisher, and date of publication), contributors, LCSH subject headings and the subject terms the search subject filter accepts, summary, languages, locations, rights information, physical description, call number, original and online formats, access restrictions, former catalog IDs, notes, and related items, plus the item's digital resources (each with its page count, representative image, PDF, and audio) and a window of its pages. Each page has a page_url and has_text; pass a page_url with has_text true to libofcongress_get_newspaper_page to read that page's text (newspaper, book, and manuscript pages alike). A long item lists 50 pages per call: continue with page_offset set to next_page_offset. Set include_files for each listed page's downloadable files (TIFF, JP2, JPEG sizes, text). Use after libofcongress_search_items on a result whose is_item is true. Pass the result id — a simple ID, an LCCN, or a slash-separated newspaper path — or a loc.gov item link (https://www.loc.gov/item/<id>/) or LCCN permalink (https://lccn.loc.gov/<lccn>), which is read as its id. Non-item results (is_item: false) — collections, exhibits, guides, newspaper pages, catalog.loc.gov records, hdl.loc.gov finding aids — have no item record and cannot be retrieved here.

Input Schema

NameRequiredDescriptionDefault
item_idYesLOC item id from a libofcongress_search_items result's "id" field (where is_item is true): a simple ID ("2009632251", "2005691065") or a slash-separated path for newspaper issues ("sn95047246/1935-09-05/ed-1"). A loc.gov item link is also read as its id: "https://www.loc.gov/item/2009632251/", http or without "www.", or "item/2009632251"; so is an LCCN permalink, as its normalized LCCN: "https://lccn.loc.gov/2005567251", http or without a scheme; "lccn.loc.gov/2005-568294" reads as 2005568294. Any other URL, such as a /resource/ page URL, is rejected.
page_limitNoPages to list. Default 50. A response lists at most 100 pages: a larger page_limit (up to 1000) is served as 100.
page_offsetNoIndex of the first page to list, 0-based across all of the item's resources. Default 0. Pass next_page_offset from the previous response to continue.
include_filesNoAlso list the download URLs of each listed page's files — every JPEG size, the JP2 and TIFF masters, OCR XML, and text files. Default false.

Output Schema

NameRequiredDescriptionDefault
urlNoCanonical LOC item URL.
dateNoPublication or creation date as LOC catalogs it: free text, a year, or a full date (e.g., "1936 Apr.", "1909-1911.", "1894", "1912-04-16"). Absent when LOC records only a coded value ("uuuu", "||||") or none.
errorNoPresent when the call failed. Absent on success.
notesNoDescriptive notes and annotations from catalogers.
pagesNoThe window of the item's pages starting at page_offset, across every resource in order. Empty when the item has no pages or page_offset is past the last page.
titleNoItem title.
noticeNoSet when page_offset is past the last page, or when page_limit was capped. Absent otherwise.
imprintNoImprint as LOC catalogs it: place, publisher, and date of publication (e.g., "New York : Werner School Book Company, c1900."), or a date alone on many photos and manuscripts ("1936 Apr."). Absent when LOC records none.
item_idNoLOC item ID: the input item_id, or the id read from the loc.gov item link or LCCN permalink passed as item_id.
summaryNoCataloger's abstract of the item's subject and historical context.
languagesNoLanguages of the item (e.g., "english").
locationsNoPlaces the item depicts or originates from (e.g., "united states").
resourcesNoThe item's digital resources, in LOC order. Empty when no digital surrogate exists.
former_idsNoSuperseded catalog identifiers or URLs this item was previously known by.
page_totalNoPages across all of the item's resources.
totalCountNoPages across all resources — mirrors output.page_total for agent reasoning.
call_numberNoLOC call number — the shelf location for requesting the physical original.
contributorsNoContributors, 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_itemsNoIDs or URLs of related LOC records for follow-up retrieval; a title stands in for a related record LOC gives neither for.
subject_termsNoSubject terms LOC indexes this item under: lowercase heading components without dates (e.g., "civil war", "united states"). Each is a value the libofcongress_search_items subject filter accepts.
online_formatsNoFormats the digitized surrogate is available in (e.g., "image").
next_page_offsetNopage_offset for the next window of pages. Absent when this window reaches the last page.
original_formatsNoMaterial types of the original (e.g., "photo, print, drawing").
subject_headingsNoLibrary of Congress Subject Headings (LCSH) assigned to this item, as cataloged (e.g., "United States--History--Civil War, 1861-1865"). Empty when the record carries none.
access_restrictedNoTrue when LOC restricts access to the original. Absent when upstream omits it.
effectivePageLimitNoThe page_limit actually served when page_limit exceeded the per-call cap of 100. Absent when page_limit was within the cap.
rights_informationNoRights and reproduction statement for this item.
physical_descriptionNoPhysical or technical description of the original item.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / item_id / description
      Previous value: -"LOC item id from a libofcongress_search_items result's \"id\" field (where is_item is true): a simple ID (\"2009632251\", \"2005691065\") or a slash-separated path for newspaper issues (\"sn95047246/1935-09-05/ed-1\"). A loc.gov item link is also read as its id: \"https://www.loc.gov/item/2009632251/\", http or without \"www.\", or \"item/2009632251\". Any other URL, such as a /resource/ page URL, is rejected."New value: +"LOC item id from a libofcongress_search_items result's \"id\" field (where is_item is true): a simple ID (\"2009632251\", \"2005691065\") or a slash-separated path for newspaper issues (\"sn95047246/1935-09-05/ed-1\"). A loc.gov item link is also read as its id: \"https://www.loc.gov/item/2009632251/\", http or without \"www.\", or \"item/2009632251\"; so is an LCCN permalink, as its normalized LCCN: \"https://lccn.loc.gov/2005567251\", http or without a scheme; \"lccn.loc.gov/2005-568294\" reads as 2005568294. Any other URL, such as a /resource/ page URL, is rejected."
    • changedOutput schema / properties / date / description
      Previous value: -"Publication or creation date as LOC catalogs it: free text, a year, or a full date (e.g., \"1936 Apr.\", \"1909-1911.\", \"1894\", \"1912-04-16\")."New value: +"Publication or creation date as LOC catalogs it: free text, a year, or a full date (e.g., \"1936 Apr.\", \"1909-1911.\", \"1894\", \"1912-04-16\"). Absent when LOC records only a coded value (\"uuuu\", \"||||\") or none."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `invalid_item_id`: item_id is neither a LOC item ID nor a loc.gov /item/ link: a URL on another loc.gov path (such as a /resource/ page URL) or another host, or text with characters or segments no LOC ID has. `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. `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."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_item_id`: item_id is not a LOC item ID, a loc.gov /item/ link, or an lccn.loc.gov permalink to an LCCN: a URL on another loc.gov or lccn.loc.gov path (such as a /resource/ page URL) or another host, an LCCN that does not normalize to up to three lowercase letters and 8 or 10 digits, or text with characters or segments no LOC ID has. `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. `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."
    • addedOutput schema / properties / imprint
      Added value: +{
      +  "description": "Imprint as LOC catalogs it: place, publisher, and date of publication (e.g., \"New York : Werner School Book Company, c1900.\"), or a date alone on many photos and manuscripts (\"1936 Apr.\"). Absent when LOC records none.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / item_id / description
      Previous value: -"LOC item ID: the input item_id, or the id read from the loc.gov item link passed as item_id."New value: +"LOC item ID: the input item_id, or the id read from the loc.gov item link or LCCN permalink passed as item_id."
    • changedOutput schema / properties / pages / items / properties / has_text / description
      Previous value: -"True when LOC holds OCR or transcribed text for this page."New value: +"True when LOC lists an OCR or transcribed text file for this page. A blank page can have one: LOC's blank-page placeholder, which libofcongress_get_newspaper_page returns as empty text."
  2. Changed19 schema fields changed
    • addedInput schema / properties / include_files
      Added value: +{
      +  "default": false,
      +  "description": "Also list the download URLs of each listed page's files — every JPEG size, the JP2 and TIFF masters, OCR XML, and text files. Default false.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / item_id / description
      Previous value: -"LOC item id from a libofcongress_search_items 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."New value: +"LOC item id from a libofcongress_search_items result's \"id\" field (where is_item is true): a simple ID (\"2009632251\", \"2005691065\") or a slash-separated path for newspaper issues (\"sn95047246/1935-09-05/ed-1\"). A loc.gov item link is also read as its id: \"https://www.loc.gov/item/2009632251/\", http or without \"www.\", or \"item/2009632251\". Any other URL, such as a /resource/ page URL, is rejected."
    • addedInput schema / properties / page_limit
      Added value: +{
      +  "default": 50,
      +  "description": "Pages to list. Default 50. A response lists at most 100 pages: a larger page_limit (up to 1000) is served as 100.",
      +  "maximum": 1000,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / page_offset
      Added value: +{
      +  "default": 0,
      +  "description": "Index of the first page to list, 0-based across all of the item's resources. Default 0. Pass next_page_offset from the previous response to continue.",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "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"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "item_id",
      +      "title",
      +      "contributors",
      +      "subject_headings",
      +      "subject_terms",
      +      "notes",
      +      "languages",
      +      "locations",
      +      "former_ids",
      +      "original_formats",
      +      "online_formats",
      +      "resources",
      +      "pages",
      +      "page_total",
      +      "related_items",
      +      "url",
      +      "totalCount"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • changedOutput schema / properties / date / description
      Previous value: -"Publication or creation date."New value: +"Publication or creation date as LOC catalogs it: free text, a year, or a full date (e.g., \"1936 Apr.\", \"1909-1911.\", \"1894\", \"1912-04-16\")."
    • addedOutput schema / properties / effectivePageLimit
      Added value: +{
      +  "description": "The page_limit actually served when page_limit exceeded the per-call cap of 100. Absent when page_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: `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. `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_item_id`: item_id is neither a LOC item ID nor a loc.gov /item/ link: a URL on another loc.gov path (such as a /resource/ page URL) or another host, or text with characters or segments no LOC ID has. `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. `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: -[
      -  "item_not_found",
      -  "rate_limit_exceeded",
      -  "server_busy",
      -  "request_timed_out"
      -]New value: +[
      +  "invalid_item_id",
      +  "item_not_found",
      +  "rate_limit_exceeded",
      +  "server_busy",
      +  "request_timed_out",
      +  "upstream_unavailable"
      +]
    • changedOutput schema / properties / item_id / description
      Previous value: -"LOC item ID as resolved by the service (matches the input item_id)."New value: +"LOC item ID: the input item_id, or the id read from the loc.gov item link passed as item_id."
    • addedOutput schema / properties / next_page_offset
      Added value: +{
      +  "description": "page_offset for the next window of pages. Absent when this window reaches the last page.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Set when page_offset is past the last page, or when page_limit was capped. Absent otherwise.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / page_total
      Added value: +{
      +  "description": "Pages across all of the item's resources.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / pages
      Added value: +{
      +  "description": "The window of the item's pages starting at page_offset, across every resource in order. Empty when the item has no pages or page_offset is past the last page.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "One page of the item.",
      +    "properties": {
      +      "files": {
      +        "description": "Download URLs of the page's files: JPEG sizes, JP2 and TIFF masters, OCR XML, text. Present only when include_files is true.",
      +        "items": {
      +          "description": "Download URL; its extension names the format.",
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "has_text": {
      +        "description": "True when LOC holds OCR or transcribed text for this page.",
      +        "type": "boolean"
      +      },
      +      "page_url": {
      +        "description": "LOC page URL. Pass to libofcongress_get_newspaper_page to read its text when has_text is true.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "page_url",
      +      "has_text"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • removedOutput schema / properties / resource_links
      Removed value: -{
      -  "description": "URLs to downloadable digital files (TIFF, JPEG, PDF). Empty when no digital surrogate exists.",
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • addedOutput schema / properties / resources
      Added value: +{
      +  "description": "The item's digital resources, in LOC order. Empty when no digital surrogate exists.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "One digital resource of the item, such as a photo, a volume, or a recording.",
      +    "properties": {
      +      "audio": {
      +        "description": "Audio stream (MP3) of a sound recording. Absent when LOC gives none.",
      +        "type": "string"
      +      },
      +      "image": {
      +        "description": "Representative image URL. Absent when LOC gives none.",
      +        "type": "string"
      +      },
      +      "page_count": {
      +        "description": "Pages (file groups) in this resource.",
      +        "type": "number"
      +      },
      +      "pdf": {
      +        "description": "PDF of the whole resource. Absent when LOC gives none.",
      +        "type": "string"
      +      },
      +      "url": {
      +        "description": "LOC resource URL; its pages are this URL plus ?sp=N.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "url",
      +      "page_count"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / subject_headings / description
      Previous value: -"LCSH subject headings assigned to this item."New value: +"Library of Congress Subject Headings (LCSH) assigned to this item, as cataloged (e.g., \"United States--History--Civil War, 1861-1865\"). Empty when the record carries none."
    • addedOutput schema / properties / subject_terms
      Added value: +{
      +  "description": "Subject terms LOC indexes this item under: lowercase heading components without dates (e.g., \"civil war\", \"united states\"). Each is a value the libofcongress_search_items subject filter accepts.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / totalCount
      Added value: +{
      +  "description": "Pages across all resources — mirrors output.page_total for agent reasoning.",
      +  "type": "number"
      +}
  3. Changed3 schema fields changed
    • changedInput schema / properties / item_id / description
      Previous value: -"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."New value: +"LOC item id from a libofcongress_search_items 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."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"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."New value: +"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. `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: -[
      -  "item_not_found",
      -  "rate_limit_exceeded"
      -]New value: +[
      +  "item_not_found",
      +  "rate_limit_exceeded",
      +  "server_busy",
      +  "request_timed_out"
      +]
  4. Changed3 schema fields changed
    • changedInput schema / properties / item_id / description
      Previous value: -"LOC item id from a libofcongress_search result's \"id\" field (where is_item is true). A simple ID (\"2009632251\", \"loc.pnp.ppmsc.02404\") 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."New value: +"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."
    • changedOutput schema / properties / contributors / description
      Previous value: -"Names of contributors, creators, or photographers."New value: +"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."
    • changedOutput schema / properties / related_items / description
      Previous value: -"IDs or URLs of related LOC items for follow-up retrieval."New value: +"IDs or URLs of related LOC records for follow-up retrieval; a title stands in for a related record LOC gives neither for."
  5. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds genuinely new behavioral facts: a 50-page window per call, continuation via next_page_offset, the 100-page response cap regardless of page_limit, and the failure mode for non-item IDs. This is well beyond what the annotations provide.

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 the core purpose, then pagination mechanics, then the alternative tool, then exclusions. It is on the long side and the enumeration of returned fields partially duplicates the output schema, but nearly every sentence carries actionable information.

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 an output schema exists, the return-field inventory is optional, yet the description still covers the two things an agent most needs to call correctly: pagination continuation and which IDs are valid vs. invalid. Nothing needed for correct invocation is missing.

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 itself already documents the accepted ID formats (simple ID, newspaper path, loc.gov link, LCCN permalink) and the page_offset continuation contract, so the description largely restates it. It adds the useful framing that page_url + has_text can be handed to the newspaper-page tool, but that is response-side rather than parameter semantics.

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 (retrieve) and resource (full metadata record for a specific LOC digital item), and names the exact precondition that identifies valid inputs (is_item: true) while distinguishing itself from libofcongress_search_items and libofcongress_get_newspaper_page.

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 says to use it after libofcongress_search_items on a result whose is_item is true, and enumerates the cases where it must NOT be used (collections, exhibits, guides, newspaper pages, catalog.loc.gov, hdl.loc.gov finding aids). It also routes the agent onward to libofcongress_get_newspaper_page with a concrete condition.

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.