Search the classical Islamic library
shamela_search_librarySearch one named shelf of the classical Islamic library (8,594 works) for quotable passages: verbatim Arabic with book, author, printed volume/page, edition and a link to the page in the Quran Gallery Maktabah reader. The default first search for hadith, tafsir, fiqh or creed. Not for isnads, narrators or diacritic-exact wording. Use shamela_search (match "words") to pin books or categories or to page past 10 results, shamela_read (unit "page") to read a whole page. Scope is one shelf per call; call again with another shelf to widen. Ranking: exact phrase first, then all the words; a madhhab scope asks that school's own books first; main text before footnote. relaxedToTokens and note flag a weaker match; no passages means absent from that scope, not from the library. A non-Arabic query or unknown scope returns a tool error naming the fix.
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": {
"query": "<query>",
"scope": "<scope>"
},
"name": "shamela_search_library"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum passages to return (max 10). | |
| query | Yes | Arabic search text. A quoted wording works best; a topic also works. | |
| scope | Yes | hadith-primary — The eight primary hadith collections, edition-pinned; tafsir-canonical — Canonical tafsir — Ibn Kathir, al-Tabari, Ibn al-Jawzi first; fiqh-hanafi — Hanafi fiqh (+ usul, comparative); fiqh-maliki — Maliki fiqh (+ usul, comparative); fiqh-shafii — Shafi'i fiqh (+ usul, comparative); fiqh-hanbali — Hanbali fiqh (+ usul, comparative); fiqh-comparative — All four schools plus comparative and fatwa collections; aqeedah — Creed and sects; hadith-sciences — Hadith commentary, takhrij and the sciences of hadith; tafsir — The whole tafsir shelf and Quranic sciences; seerah — Prophetic biography, history and biographical dictionaries; lugha — Arabic language, lexicons, grammar and adab |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Present only when the result needs a caveat; carry it with the passages. | |
| scope | No | The scope searched, as sent. | |
| passages | No | Best evidence first: exact phrase before word matches, main text before footnote, the school's own shelf before the wider one. Empty when nothing in the scope matched. | |
| totalMatches | No | Matching pages the library verified in the scope before the limit, or null. | |
| booksSearched | No | Books in the searched scope, or null when the library did not say. | |
| relaxedToTokens | No | True when the exact phrase was not found and a looser word search answered. |