Skip to main content
Glama
This connector has been deprecated

Get book details

shamela_get_book
Read-onlyIdempotent

جلب بيانات كتاب

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

TableJSON Schema
NameRequiredDescriptionDefault
book_idYesThe book id (e.g. 9942).
include_coverNoAttach 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_formatNoOutput 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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare read-only/idempotent/no-destruction, and the description still adds substantial non-obvious behavior: book_date is usually the author's death year (not composition), downloaded is true only under a dual condition, cover absence does not imply no scan, and same_group entries must not be double-counted as sources. This is exactly the kind of field-level semantics annotations cannot carry.

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 purpose is front-loaded in the first sentence, and most of the parenthetical caveats (book_date, downloaded, same_group, notes) earn their place given there is no output schema. It is dense and slightly redundant with the schema on cover-token cost, but not padded.

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 no output schema, the description carries the full burden of return-value documentation, and it delivers: it names the returned fields and their pitfalls, explains the notes array as non-fabricable citation fields, and gives id-resolution guidance. Nothing an agent needs to interpret the response 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 100%, so the baseline is 3, but the description adds genuine decision context for include_cover (why to suppress it, that absence is not meaningful, that ~1,368 of 8,594 books have one) and reinforces the cover/scan distinction. It does not, however, add anything about response_format beyond what the schema states.

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?

Opens with a specific verb+resource ('Fetch full metadata for a book by book_id') and immediately enumerates the fields returned, so an agent knows exactly what this provides versus shamela_get_book_parts, shamela_get_toc, or shamela_get_page. It also disambiguates scope from shamela_list_downloaded_books by stating it 'works on any catalog book whether downloaded or not.'

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?

Explicitly routes id discovery to shamela_resolve('book name') or shamela_list_downloaded_books, and clarifies the downloaded-vs-catalog scope. It stops short of stating when to prefer a sibling like shamela_brief or shamela_get_book_parts, but the context for use is clear.

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.

Resources