Skip to main content
Glama

Get Work

openlibrary_get_work
Read-onlyIdempotent

Fetch a work by Open Library Work ID (OL…W). Returns title, description, subjects, cover IDs, and linked author IDs for follow-up lookups. Works represent the abstract book concept independent of any specific edition. A merged work ID resolves to the work it was merged into. To reach a work from an ISBN, call openlibrary_get_edition with id_type "isbn" — its work_id output is the parent work. Note: author names are not included — use openlibrary_get_author or openlibrary_search_books for names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
work_idYesOpen Library Work ID. Format: OL…W (e.g., "OL45804W"), optionally prefixed "/works/". Not an ISBN — resolve an ISBN to its work with openlibrary_get_edition (id_type "isbn").

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
titleNoWork title.
noticeNoSet when the requested work ID was merged into a different canonical ID, and when the text output caps a long subject list (naming the omitted count and the complete array in structuredContent). Absent when neither applies.
createdNoISO 8601 creation timestamp. Absent when not available.
work_idNoCanonical Open Library Work ID (OL…W) — differs from the requested work_id when that ID was merged into this work.
subjectsNoSubject tags for this work.
cover_idsNoNumeric cover IDs. Pass to openlibrary_get_cover_url with id_type "id".
author_idsNoOpen Library Author IDs (OL…A). Use openlibrary_get_author for names and bio.
descriptionNoWork description or blurb. Absent when not provided.
last_modifiedNoISO 8601 last-modified timestamp. Absent when not available.
subject_timesNoTime period subjects.
subject_peopleNoPeople subjects.
subject_placesNoGeographic subjects.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / work_id / description
      Previous value: -"Open Library Work ID. Format: OL…W (e.g., \"OL45804W\"). A leading \"/works/\" prefix is stripped if provided."New value: +"Open Library Work ID. Format: OL…W (e.g., \"OL45804W\"), optionally prefixed \"/works/\". Not an ISBN — resolve an ISBN to its work with openlibrary_get_edition (id_type \"isbn\")."
    • addedInput schema / properties / work_id / pattern
      Added value: +"^(?:\\/works\\/)?OL\\d+W$"
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `not_found`: Work ID does not exist on Open Library. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `not_found`: Work ID does not exist on Open Library, or it redirects to no reachable work. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / notice / description
      Previous value: -"Disclosure when the text output caps a long list — names the omitted count and points to the complete array in structuredContent. Absent when nothing was capped."New value: +"Set when the requested work ID was merged into a different canonical ID, and when the text output caps a long subject list (naming the omitted count and the complete array in structuredContent). Absent when neither applies."
    • changedOutput schema / properties / work_id / description
      Previous value: -"Canonical Open Library Work ID (OL…W)."New value: +"Canonical Open Library Work ID (OL…W) — differs from the requested work_id when that ID was merged into this work."
  2. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "work_id",
      +      "title",
      +      "subjects",
      +      "subject_places",
      +      "subject_times",
      +      "subject_people",
      +      "cover_ids",
      +      "author_ids"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `not_found`: Work ID does not exist on Open Library. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "not_found"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "work_id",
      -  "title",
      -  "subjects",
      -  "subject_places",
      -  "subject_times",
      -  "subject_people",
      -  "cover_ids",
      -  "author_ids"
      -]
  3. Changed1 schema field changed
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Disclosure when the text output caps a long list — names the omitted count and points to the complete array in structuredContent. Absent when nothing was capped.",
      +  "type": "string"
      +}
  4. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, and open-world behavior. The description adds valuable behavioral context beyond them: merged work IDs resolve to their merged target, and author names are deliberately excluded from the response. This is meaningful disclosure that helps the agent set expectations.

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 compact and front-loaded with the essential action and return shape. Each sentence earns its place: core purpose, output fields, edition distinction, merged-ID behavior, ISBN routing, and the author-name caveat. No filler or repetition.

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?

With an output schema present, the description does not need to enumerate return details further. It covers the key edge cases an agent will encounter — ISBN lookup routing, merged works, and missing author names — making the tool fully callable in context.

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 100% and the schema thoroughly documents work_id format and examples. The description still adds semantic value by explaining how an ISBN can lead to a work_id via openlibrary_get_edition, and by reinforcing that the parameter is not an ISBN.

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: 'Fetch a work by Open Library Work ID'. It names the returned fields and explicitly contrasts works with editions, distinguishing it from openlibrary_get_edition and openlibrary_get_editions.

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?

The description gives concrete routing guidance: use openlibrary_get_edition with id_type 'isbn' when starting from an ISBN, and use openlibrary_get_author or openlibrary_search_books when author names are needed. It also explains the merged-work resolution behavior, leaving little ambiguity about when to call this tool.

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.