Get book details
shamela_get_bookجلب بيانات كتاب
Fetch full metadata for a book by book_id. Returns book_name, all authors (main + co), category, book_type (printed/manuscript/journal/thesis/electronic/audio), book_date (Shamela's «تاريخ الكتاب» — on 98.5% of dated books this is the MAIN AUTHOR's death year, not a composition year; do not cite it as one), printed flag, downloaded flag (true ONLY when both master.db says so AND the per-book SQLite has page rows), publication_date (DDMMYYYY Hijri from meta_data), sub_books, same_group (other catalog entries of the SAME work — Ṣaḥīḥ al-Bukhārī is 8 entries: five editions plus three abridgments; treat quotes from two of them as one source, not two), scan (the scanned PDF printing Shamela holds, with resolved download URLs), cover (a ~310x460 JPEG of that printing's title page, attached as an image block by default — pass include_cover:false to suppress; only 1,368 of 8,594 books have one. Its absence does NOT mean there is no scanned printing — 377 books carry a scan with no cover image — and it says nothing about the book's real binding; read scan for whether a scan exists), and a notes array listing citation-grade fields master.db doesn't have (edition/publisher/city/editor — never fabricate these). Find ids via shamela_resolve('book name') or shamela_list_downloaded_books. Works on any catalog book whether downloaded or not.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| book_id | Yes | The book id (e.g. 9942). | |
| include_cover | No | Attach the book's cover image as an MCP image block when Shamela ships one (1,368 of 8,594 books). The picture is a ~310x460 thumbnail of the scanned printing's title page, so it costs roughly 190 image tokens. Set false to keep the reply text-only; `cover.available` still reports whether one exists. | |
| response_format | No | Output format for the human-readable text. 'markdown' (default) is best for direct display; 'json' returns the same data as a single JSON code block; 'none' skips the rendered text entirely and returns a one-line pointer, leaving `structuredContent` as the whole answer. The structured data is returned in `structuredContent` regardless of this setting, so a caller that parses it should pass 'none' — the character budget is measured over BOTH channels, and the unread copy is otherwise spending most of it. Requires the 'response_format.none' capability (see shamela_brief). | markdown |