Get Subject
openlibrary_get_subjectBrowse works by subject. Returns matching works with edition counts and cover IDs, the total work count, and the subject type. Case and spacing are normalized before lookup, so "Science Fiction" and "science_fiction" are the same request. Prefix a value with place:, person:, or time: to browse a place, person, or time period, passing a value from openlibrary_get_work's subject_places, subject_people, or subject_times verbatim after the prefix (e.g., "place:London (England)"); a space after the colon is dropped. 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.
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": {
"subject": "<subject>"
},
"name": "openlibrary_get_subject"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max works to return; values above 1000 apply 1000 when limit clamping is enabled. Subject pages typically show 12 at a time. | |
| offset | No | Zero-based offset for pagination. | |
| subject | Yes | Subject name, or a place:, person:, or time: prefix followed by a place, person, or time-period value (e.g., "place:London (England)", "person:Elizabeth Bennet", "time:19th century"). Normalized before lookup — trimmed, lowercased, whitespace after a place:, person:, or time: prefix dropped, and remaining whitespace converted to underscores (e.g., " Science Fiction " → "science_fiction", "place: London" → "place:london") — so varying case or spacing does not change the result. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present when the call failed. Absent on success. | |
| works | No | Works under this subject, up to limit. | |
| notice | No | Recovery guidance when work_count is 0 or the offset is at or past work_count, composed with requested/applied page limits and next offset when the limit was reduced to 1000. Absent when none applies. | |
| offset | No | Zero-based offset of the first returned result — echoes the requested offset, so an empty page still records the offset that produced it. | |
| totalCount | No | Total works tagged with this subject across all pages. | |
| work_count | No | Total works tagged with this subject. | |
| subject_key | No | Normalized subject key (lowercase, underscores). | |
| subject_name | No | Canonical subject name as stored on Open Library. | |
| subject_type | No | How Open Library reads the key: "place", "person", or "time" for those prefixes, "subject" for anything else, an unrecognized prefix included. Absent when Open Library omits it. |