Skip to main content
Glama

Get Subject

openlibrary_get_subject
Read-only

Browse works by subject. Returns matching works with edition counts and cover IDs, plus the total work count for the subject. Case and spacing are normalized before lookup, so "Science Fiction" and "science_fiction" are the same request. Subject tags are user-contributed and the vocabulary varies — when a subject returns no works, try a different word form (singular/plural), a synonym, or a broader term.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax works to return. Subject pages typically show 12 at a time.
offsetNoZero-based offset for pagination.
subjectYesSubject name. Normalized before lookup — lowercased with spaces converted to underscores (e.g., "Science Fiction" → "science_fiction") — so varying case or spacing does not change the result.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
worksNoWorks under this subject, up to limit.
noticeNoRecovery guidance when work_count is 0 — echoes the subject and suggests alternatives. Absent when works are found.
totalCountNoTotal works tagged with this subject across all pages.
work_countNoTotal works tagged with this subject.
subject_keyNoNormalized subject key (lowercase, underscores).
subject_nameNoCanonical subject name as stored on Open Library.

TDQS

A4.5/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 description correctly supplements these by explaining case/spacing normalization and that subjects are user-contributed with varying vocabulary. It also details the outputs (edition counts, cover IDs, total work count), adding context 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 waste. It front-loads the primary purpose, then lists key outputs, then explains normalization and provides fallback advice. Each sentence earns its place and the structure is logical and scannable.

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 retrieval tool with an output schema, the description is complete. It explains what is returned, how the input is normalized, and how to handle empty results. The openWorldHint is backed with concrete guidance. Nothing essential is missing for an agent to call this tool correctly.

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 description coverage is 100%, so parameters are fully documented in the schema. The description adds extra value by explaining the normalization behavior for the subject parameter and giving usage advice for the open-world nature of subjects, which goes beyond the schema's basic type/description. This compensates well for the high coverage baseline.

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 'Browse works by subject', stating a specific verb and resource. It then lists what is returned (works with edition counts, cover IDs, total work count), making the tool's function unambiguous and clearly distinct from sibling tools focused on authors, covers, editions, and search.

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 clearly indicates when to use the tool (to browse works by subject) and provides practical guidance on handling the open-world variable vocabulary by suggesting synonyms, singular/plural forms, and broader terms. It stops short of explicitly stating when not to use it or naming alternatives, but the context is strong enough for an agent to make the right choice.

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.

TDQS

A4.4/5.0
Disambiguation5/5

Every tool targets a distinct resource-action pair: author lookup, author works, cover resolution, edition resolution by identifier, edition listing by work, subject browsing, work lookup, and three search types (authors, books, full-text). The only near-overlap is get_edition vs get_editions, but the descriptions clearly separate identifier-based resolution from listing editions of a work, and cross-references reinforce the distinction.

Naming Consistency5/5

All tools follow a consistent snake_case verb_noun pattern: get_* for direct retrieval and search_* for query-based lookups. The single pair get_edition/get_editions is a natural pluralization, not an inconsistency. Naming is predictable and intuitive throughout.

Tool Count5/5

Ten tools is an ideal size for a read-heavy library API. Each tool serves a distinct purpose (author, work, edition, subject, cover, three search modes) without redundancy or bloat. The surface feels deliberately scoped and not overwhelming.

Completeness5/5

The set covers the full read surface of Open Library: authors (get/search), works (get/search), editions (get by ID, list by work), subjects, covers, and full-text search. There are no obvious missing operations—all core entities and lookup paths are represented, and recoveries for missing data (e.g., author names) are built into descriptions.