Skip to main content
Glama

libofcongress-mcp-server

Search LC Subject Headings

libofcongress_search_subjects
Read-only

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of subject headings to return. Default 10, max 50.
queryYesKeyword or partial subject heading to search for (e.g., "civil war", "immigration", "jazz").

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
capNoThe limit applied to this response — maximum headings the API will return.
errorNoPresent when the call failed. Absent on success.
shownNoNumber of subject headings returned in this response.
totalNoNumber of subject headings returned.
noticeNoRecovery 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.
subjectsNoLCSH subject headings matching the query, ordered by relevance.
truncatedNoTrue when results were capped at the requested limit. Increase limit or refine the query to surface additional headings.
effectiveQueryNoThe keyword query as submitted to the id.loc.gov suggest endpoint, after trimming.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds valuable context: LCSH terms are standardized and differ from natural language, with concrete examples, and that the returned labels are meant to be fed into a downstream search. This goes beyond the annotations without contradicting them.

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 with no filler: it states the action, the return value, and the downstream usage rationale. The parenthetical examples are instructive rather than redundant, and the most important scoping information is front-loaded.

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 two-parameter lookup tool with a full input schema, output schema present, and safety annotations, the description tells an agent everything needed to invoke it correctly: what to search, what it returns, and how to use the result. No critical context 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?

The input schema already documents both parameters with 100% coverage, including examples for query and constraints for limit. The description adds little parameter-specific meaning beyond calling the search 'by keyword,' so the baseline of 3 is appropriate.

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 specific verb and resource: 'Search Library of Congress Subject Headings (LCSH) by keyword.' It clearly states the output (controlled-vocabulary subject labels and URIs) and distinguishes the tool's role from the sibling libofcongress_search by positioning this as the subject-term lookup step.

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?

The description gives explicit when-to-use guidance: run this tool before a subject-filtered libofcongress_search, and use the returned label as the subject filter. It does not enumerate when-not-to-use cases or compare against alternative lookups, so it stops short of a full 5.

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.