Skip to main content
Glama
mcp-libraryofcongress

mcp-libraryofcongress

Search the catalogue

search_items
Read-onlyIdempotent

Search the Library of Congress catalog by required media type, such as books, photos, maps, or newspapers, then filter by subject, location, language, year, and collection.

Instructions

Search the Library of Congress catalogue: books, photographs, maps, recordings, films, manuscripts, sheet music and newspaper titles. 'media_type' is required, because the Library keeps a separate catalogue for each kind of thing. This matches titles, creators and catalogue descriptions. It does not read the text inside a scan; use search_newspapers for a phrase printed on a newspaper page. Filters take the words the Library itself uses: 'subject' and 'location' as the rows here spell them, 'language' written in English, 'collection' as list_collections reports it under 'collection_filter'. A filter matching nothing is set aside and the search asked again without it; the answer names what was dropped, and the count it reports is then the unfiltered search's. By default only material with a digitised copy is returned; set 'online_only' to false to take in records the Library holds on a shelf alone. A row carries an 'identifier' get_item takes when it names a record. A row that is a collection the Library gathered names no record: 'is_collection' is true there, 'identifier' is null, and 'source_url' opens the collection.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>",
      "media_type": "<media_type>"
    },
    "name": "search_items"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNo
sortNoOrder of the results.relevance
limitNo
queryYesWords to look for in titles, creators and catalogue descriptions. The catalogue index holds no word of a single letter, so at least one word has to run to two letters or more, unless it is written in a script where one character is a word.
subjectNoA subject heading, such as 'crime'.
year_toNoLatest year, inclusive.
languageNoA language, written in English: 'english'.
locationNoA place, such as 'oklahoma'.
year_fromNoEarliest year, inclusive.
collectionNoA collection, named exactly as list_collections reports it under 'collection_filter'.
media_typeYesWhich catalogue to search: books, photos, maps, audio, film-and-videos, manuscripts, notated-music or newspapers. 'newspapers' holds the papers themselves; a phrase printed on a page belongs in search_newspapers.
online_onlyNoKeep to material with a digitised copy. Set false to include shelf-only records.

Output Schema

NameRequiredDescriptionDefault
pageYes
itemsYes
notesYes
queryYes
totalYesRecords matching across this catalogue for the search the rows come from, not the number returned. A filter that matched nothing is set aside, and this then counts the search without it, which the notes name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv3.1.0
    • removedOutput schema / properties / items / items / properties / creator / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / items / items / properties / creator / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / items / items / properties / date / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / items / items / properties / date / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / items / items / properties / date_code / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / items / items / properties / date_code / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / items / items / properties / format / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / items / items / properties / format / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / items / items / properties / identifier / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / items / items / properties / identifier / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / items / items / properties / title / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / items / items / properties / title / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. Changed6 schema fields changedv2.1.0
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / query / description
      Previous value: -"Words to look for in titles, creators and catalogue descriptions."New value: +"Words to look for in titles, creators and catalogue descriptions. The catalogue index holds no word of a single letter, so at least one word has to run to two letters or more, unless it is written in a script where one character is a word."
    • addedOutput schema / properties / items / items / properties / date_code
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "The cataloguing code the Library files the row under in place of a date, such as 'uuuu' or '18??'. It stands for digits the Library has not established, so 'date' and 'year' are null beside it. Null wherever the filed value is a date."
      +}
    • addedOutput schema / properties / items / items / properties / is_collection
      Added value: +{
      +  "description": "True when the row is a collection a curator gathered and named rather than a record of the catalogue searched. The item route holds nothing at a collection's address, so 'identifier' is null and 'source_url' is where it opens.",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / items / items / required
      Previous value: -[
      -  "identifier",
      -  "title",
      -  "creator",
      -  "year",
      -  "date",
      -  "format",
      -  "location",
      -  "subjects",
      -  "online",
      -  "source_url"
      -]New value: +[
      +  "identifier",
      +  "is_collection",
      +  "title",
      +  "creator",
      +  "year",
      +  "date",
      +  "date_code",
      +  "format",
      +  "location",
      +  "subjects",
      +  "online",
      +  "source_url"
      +]
    • changedOutput schema / properties / total / description
      Previous value: -"Records matching across this catalogue, not the number returned."New value: +"Records matching across this catalogue for the search the rows come from, not the number returned. A filter that matched nothing is set aside, and this then counts the search without it, which the notes name."
  3. First observedv1.0.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover the read-only/idempotent/open-world profile, but the description adds non-obvious behaviour the annotations cannot convey: a filter matching nothing is silently dropped and the search re-run, the reported count becomes the unfiltered count, and the response names what was dropped. It also discloses the default online-only restriction and the shape of collection rows (is_collection true, identifier null, source_url).

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, then the required-parameter rationale, then the sibling exclusion, then filter vocabulary and fallback behaviour. Dense and mostly waste-free, though the filter-dropping and row-shape sentences are long and could be tightened.

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 12-parameter search tool with an output schema, it covers the two required params, the default filter behaviour, the failure mode, and the alternative tools. Nothing an agent needs to call it correctly or interpret a row is missing.

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 high (83%), and the description still adds real semantics: why media_type is mandatory (separate catalogue per kind), that subject/location must use the Library's own headings, that language is written in English, and that collection must match list_collections' 'collection_filter' value. It doesn't cover page/limit/sort/year_from/year_to beyond what the schema already says.

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 and resource ('Search the Library of Congress catalogue') and enumerates the eight media types covered. It explicitly carves out the boundary with search_newspapers ('does not read the text inside a scan') and points to get_item via the returned identifier, so an agent can separate it from all three siblings.

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 rules: use search_newspapers for a phrase printed on a newspaper page, use get_item on a row's identifier, use list_collections to obtain a valid collection value. It also states the when-not condition for online_only ('set to false to take in records the Library holds on a shelf alone').

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