Get Cover URL
openlibrary_get_cover_urlConstruct 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
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Image size. S = small (~45px tall), M = medium (~150px tall), L = large (~400px tall). | M |
| target | No | "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_type | Yes | "id" is the numeric cover_i / cover ID from search or work results. "isbn" and "olid" look up the cover from those identifiers. | |
| identifier | Yes | 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Direct HTTPS URL to the cover image; not fetched or verified by this tool. | |
| note | No | Reminder that the image is unverified and a missing cover may return a placeholder. | |
| error | No | Present when the call failed. Absent on success. |