Skip to main content
Glama
This connector has been deprecated

Search the classical Islamic library

search_library
Read-onlyIdempotent

Search a Maktabah al-Shamela library of 8,594 classical works and return passages with the book, author, printed edition page and the verbatim Arabic. Each passage also carries its edition, editor and publisher when the library records them, and a sourceUrl on shamela.ws. Runs an exact-phrase pass first and falls back to a token search, reporting which one answered. A scope is REQUIRED: unscoped ranking in this corpus is by term frequency, which surfaces a poetry anthology above a hadith collection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum passages to return (max 10).
queryYesArabic search text. A quoted wording works best; a topic also works.
scopeYeshadith-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

TableJSON Schema
NameRequiredDescriptionDefault
noteNoPresent only when the result needs a caveat.
scopeYes
passagesYes
totalMatchesYes
booksSearchedYes
relaxedToTokensYesTrue when the exact phrase was not found and a looser word search answered.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior5/5

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

Annotations cover safety (readOnly, idempotent, non-destructive, closed-world), so the description is free to add real behavioral depth — and it does: the two-pass strategy (exact phrase first, token fallback), that it reports which pass answered, the scope requirement's rationale, and which optional metadata fields are only present 'when the library records them'. That is unusually informative beyond structured fields.

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?

Four sentences, all doing work, with the corpus scope and return payload front-loaded and the escalation to the scope constraint last where it lands hardest. Density is high but no sentence is filler; slightly more compression of the output-field list would help.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, the description needn't spell out return values, yet it summarizes them usefully and covers the required-vs-optional parameter distinction. Nothing critical is missing for correct invocation, though a hint about result breadth relative to limit (max 10) or scope selection strategy is absent.

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 earns above baseline by explaining *why* scope is mandatory and how ranking degrades without it, which the enum alone cannot convey. The query parameter gets the same 'quoted wording works best' hint already in the schema, so that part adds nothing.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource (search a Maktabah al-Shamela library of 8,594 classical works) and enumerates exactly what comes back: book, author, printed edition page, verbatim Arabic, editor/publisher, and a sourceUrl. It is very clear on its own, but it never contrasts itself with the many sibling search tools (shamela_search_phrase, shamela_search_exact, shamela_search_boolean, search), leaving the agent to infer the boundary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explains a usage-relevant constraint — that a scope is required because unscoped term-frequency ranking surfaces a poetry anthology above a hadith collection — and notes the exact-phrase-then-token fallback. However, it gives no when-to-use-versus-alternative guidance: nothing tells the agent why to pick this over shamela_search_phrase, shamela_search_exact, or shamela_search_boolean for the same query.

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