Skip to main content
Glama
This connector has been deprecated

Search the book catalogue

shamela_search_books
Read-onlyIdempotent

بحث في فهرس الكتب

Search Shamela's catalog of ~8,500 books by name, author, bibliography text, OR the editorial description of what the book is about (1,729 entries carry one, averaging ~1,500 characters). That last field is what finds a book by SUBJECT rather than title: «الرجز» matches 0 titles and 2 descriptions. Each hit reports matched_in: 'bibliography' (title/author/publication line) or 'description'. Pre-built index — works even before any books are downloaded. scope.book_ids is not accepted (the catalog IS the universe); use scope.author_ids, category_ids, period_*, downloaded_only. Returns paginated results with book name, author, category, book_date, downloaded flag, and a snippet showing the matched text. Examples: shamela_search_books({query:'الأصول'}), shamela_search_books({query:'فقه', scope:{category_ids:[17], downloaded_only:true}}).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return (1-100, default 20).
queryYesArabic search phrase matched against the book name + author + bibliography concatenation.
scopeNoOptional: restrict to specific authors, categories, periods, or downloaded-only.
offsetNoNumber of results to skip for pagination. Use with `limit` to page through large result sets. The response includes `has_more` and `next_offset` to drive paging.
optionsNomorphology / wildcards / relax_when_empty / preserve_*.
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 cover the safe-read profile, yet the description adds substantial behavior: the `matched_in` field distinguishing bibliography from description hits, the pre-built index working before any download, and the full shape of a paginated result (name, author, category, book_date, downloaded flag, snippet). This is real value beyond the structured annotations.

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?

Front-loaded with the core purpose and the subject-search insight, and the examples are placed at the end so they do not obstruct the first read. It is dense but nearly every clause adds a distinct fact; the duplicated Arabic title line is minor overhead.

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 return-value burden and does so: it names the fields each hit reports, the snippet behavior, and the pagination contract. Together with the rich input schema, an agent has everything needed to call it correctly.

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 description coverage is 100%, so the baseline is 3; the description adds meaning by explaining the subject-vs-title semantics of the query field, the matched_in discriminator, and the explicit rejection of scope.book_ids. It stops short of adding the full wildcard/morphology reasoning that lives in the schema.

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?

States a specific verb and resource (search the Shamela catalogue of ~8,500 books) and specifies the exact indexed fields (name, author, bibliography, editorial description). It also carves out its niche against siblings by contrasting subject-search versus title-search and noting pre-built index scope.

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?

Gives concrete guidance: use the description field to find a book by SUBJECT, and lists which scope filters apply (author_ids, category_ids, period_*, downloaded_only) while explicitly ruling out scope.book_ids. It provides runnable examples but does not explicitly name which sibling to use instead when the target is page content or chapter titles.

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