Skip to main content
Glama

Get Cover URL

openlibrary_get_cover_url
Read-onlyIdempotent

Construct a cover image URL for a book or author photo without fetching the image. Returns a direct HTTPS URL in the requested size (S/M/L). The identifier format is validated locally: "id" must be numeric, "isbn" 10 or 13 digits (an ISBN-10 may end in an X check digit), "olid" an edition OLID (OL…M) for target "book" and an author OLID (OL…A) for target "author". Identifiers with path separators or control characters, and author-by-ISBN lookups, are rejected. A returned URL does not verify that a cover exists.

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": {
      "identifier": "<identifier>",
      "id_type": "<id_type>"
    },
    "name": "openlibrary_get_cover_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
sizeNoImage size. S = small (~45px tall), M = medium (~150px tall), L = large (~400px tall).M
targetNo"book" returns a book cover from covers.openlibrary.org/b/. "author" returns an author photo from covers.openlibrary.org/a/ — use with id_type "id" (photo_id) or "olid" (author OLID).book
id_typeYes"id" is the numeric cover_i / cover ID from search or work results. "isbn" and "olid" look up the cover from those identifiers.
identifierYesThe identifier value, validated against id_type before the URL is built. For "id": a numeric cover or photo ID from work/edition/author data. For "isbn": 10 or 13 digits, hyphens optional — an ISBN-10 may end in an X check digit (e.g., 080442957X). For "olid": an edition OLID (OL…M) for target "book", an author OLID (OL…A) for target "author", in any case — the URL carries it upper-cased.

Output Schema

NameRequiredDescriptionDefault
urlNoDirect HTTPS URL to the cover image; not fetched or verified by this tool.
noteNoReminder that the image is unverified and a missing cover may return a placeholder.
errorNoPresent when the call failed. Absent on success.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / identifier / description
      Previous value: -"The identifier value, validated against id_type before the URL is built. For \"id\": a numeric cover or photo ID from work/edition/author data. For \"isbn\": 10 or 13 digits, hyphens optional — an ISBN-10 may end in an X check digit (e.g., 080442957X). For \"olid\": an edition OLID (OL…M) for target \"book\", an author OLID (OL…A) for target \"author\"."New value: +"The identifier value, validated against id_type before the URL is built. For \"id\": a numeric cover or photo ID from work/edition/author data. For \"isbn\": 10 or 13 digits, hyphens optional — an ISBN-10 may end in an X check digit (e.g., 080442957X). For \"olid\": an edition OLID (OL…M) for target \"book\", an author OLID (OL…A) for target \"author\", in any case — the URL carries it upper-cased."
  2. Changed2 schema fields changed
    • changedOutput schema / properties / note / description
      Previous value: -"Reminder that the URL always returns HTTP 200; a placeholder GIF is served when no cover exists."New value: +"Reminder that the image is unverified and a missing cover may return a placeholder."
    • changedOutput schema / properties / url / description
      Previous value: -"Direct HTTPS URL to the cover image. The Covers API returns HTTP 200 for all requests — a 1×1 placeholder GIF is returned when no cover exists for the identifier."New value: +"Direct HTTPS URL to the cover image; not fetched or verified by this tool."
  3. Changed1 schema field changed
    • changedInput schema / properties / identifier / description
      Previous value: -"The identifier value, validated against id_type before the URL is built. For \"id\": a numeric cover or photo ID from work/edition/author data. For \"isbn\": 10 or 13 digits, hyphens optional. For \"olid\": an edition OLID (OL…M) for target \"book\", an author OLID (OL…A) for target \"author\"."New value: +"The identifier value, validated against id_type before the URL is built. For \"id\": a numeric cover or photo ID from work/edition/author data. For \"isbn\": 10 or 13 digits, hyphens optional — an ISBN-10 may end in an X check digit (e.g., 080442957X). For \"olid\": an edition OLID (OL…M) for target \"book\", an author OLID (OL…A) for target \"author\"."
  4. 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": [
      +      "url",
      +      "note"
      +    ]
      +  },
      +  {
      +    "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: `invalid_identifier`: The identifier contains path separators, \"..\", or control characters, or does not match the format its id_type expects. `invalid_target`: The id_type is not valid for the target — an author photo cannot be resolved by ISBN. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "invalid_identifier",
      +            "invalid_target"
      +          ],
      +          "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: -[
      -  "url",
      -  "note"
      -]
  5. Changed1 schema field changed
    • changedInput schema / properties / identifier / description
      Previous value: -"The identifier value. For \"id\": numeric cover ID from work/edition data. For \"isbn\": 10 or 13 digits, hyphens stripped. For \"olid\": edition OLID (OL…M) or author OLID (OL…A) when target is \"author\"."New value: +"The identifier value, validated against id_type before the URL is built. For \"id\": a numeric cover or photo ID from work/edition/author data. For \"isbn\": 10 or 13 digits, hyphens optional. For \"olid\": an edition OLID (OL…M) for target \"book\", an author OLID (OL…A) for target \"author\"."
  6. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description discloses real behavior: validation happens locally before the URL is built, path separators and control characters are rejected, author-by-ISBN lookups are rejected, and a success result does not confirm a cover exists. These are exactly the failure modes and semantic caveats an agent needs.

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?

The core capability and the non-fetch guarantee are front-loaded, and each following sentence adds a distinct fact (size, format validation, rejections, existence caveat). It is dense but nearly every clause earns its place; only mild redundancy with the schema keeps it from a 5.

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 covering the return value and annotations covering the safety profile, the description supplies the remaining pieces an agent needs: identifier formats per id_type, invalid-input behavior, and the limitation that the URL does not guarantee a cover. Nothing material 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 already 100%, so the baseline is 3. The description adds genuine value on top by compressing the per-id_type formats into one place and, critically, stating the cross-parameter constraint that author-by-ISBN lookups are rejected, which the schema only implies.

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: 'Construct a cover image URL for a book or author photo without fetching the image.' It states the return artifact (a direct HTTPS URL in S/M/L) and distinguishes itself from sibling lookup tools by emphasizing that no fetch occurs.

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 phrase 'without fetching the image' plus the closing caveat 'A returned URL does not verify that a cover exists' give clear context for when this tool is appropriate and what it cannot answer. It stops short of naming an alternative tool or explicitly enumerating when not to use it, so it falls just below the top score.

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.