Search the book catalogue
shamela_search_booksبحث في فهرس الكتب
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
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of results to return (1-100, default 20). | |
| query | Yes | Arabic search phrase matched against the book name + author + bibliography concatenation. | |
| scope | No | Optional: restrict to specific authors, categories, periods, or downloaded-only. | |
| offset | No | Number 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. | |
| options | No | morphology / wildcards / relax_when_empty / preserve_*. | |
| 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 |