Skip to main content
Glama

Maktaba-e-Qamar (مکتبۂ قمر)

Search the library

search
Read-only

Full-text search over the OCR text of the Maktaba-e-Qamar books (Urdu/Arabic/Persian, Hanafi/Barelvi). Search works best with 1-4 distinctive Urdu or Arabic keywords, not whole sentences. Try both scripts and spelling variants in separate searches (Urdu نماز / Arabic صلاة, ص/س, ة/ت, old spellings like صلوٰة, singular/plural). ی/ي, ک/ك, ہ/ھ, harakat, hamza forms, with/without ال, particles (کا، کی، میں، في، على) and old orthography (مین = میں) are handled automatically. Romanized and English queries are machine-transliterated (see searched_as) and less precise; prefer typing Urdu/Arabic yourself. Optional book limits the search to one book (work number like "46" or title/author words in any script; all volumes; if several books match, all are searched and listed in books with their text coverage). Returns one result per page: {id, title, url (the page as text on the library site when the book's text is public, else the scan), scan_url, text, metadata}; index_entry results are table-of-contents lines (points_to_page = the printed book page; target_url / target_id = the page it links to, open it to read the actual discussion). Use fetch with the id to read the page.

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>"
    },
    "name": "search"
  }
}

Input Schema

NameRequiredDescriptionDefault
bookNoOptional: work number ("46") or book title/author words, e.g. "شامی", "Radd-ul-Muhtar".
limitNoMax pages to return (default 10, max 25).
queryYesKeywords (Urdu or Arabic script preferred; English / romanized accepted).
meaningNoOptional: true = search by meaning (semantic) instead of words: for a question or concept in any language whose wording may differ from the book's (e.g. "patience in hardship"). Keyword search already adds meaning-based pages when it finds few.
sectionNoOptional topic key: own (works of Mufti Muhammad Qamarul Hasan himself, and a few writings about him), quran (Quran & Quranic sciences), tafsir (tafsir), hadith (hadith), fiqh (fiqh & usul), fatawa (fatawa), aqidah (aqidah & kalam), munazara (polemics & refutations), tasawwuf (tasawwuf), sirah (sirah & virtues of the Prophet ﷺ), manaqib (manaqib), tarikh (history), tazkira (biography), poetry (poetry (naat, qasida)), language (Arabic language), mantiq (logic & philosophy), adab (literature & misc.), other (other), notref (other material, not reference books (mostly not OCR'd)).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnly/non-destructive/closed-world, so the safety profile is covered; the description adds real behavioral value by disclosing normalization rules (ی/ي, ہ/ھ, harakat, particles handled automatically), that `url` is text only when the book's text is public and otherwise a scan, and that index_entry rows are table-of-contents lines. It does not describe pagination/ranking or ordering of results, so it is good but not complete.

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, then search tactics, then the `book` filter and result shape; every clause carries information, though the dense parenthetical variant lists and normalization inventory make it long and harder to scan than an ideal definition.

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?

For a search tool with no output schema, the description fully specifies the return shape ({id, title, url, scan_url, text, metadata}), the special index_entry result type with points_to_page/target_url/target_id, and the next action via `fetch`, which is everything an agent needs to call and consume it.

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?

With 100% schema coverage the baseline is 3, and the description goes beyond it: it explains that `book` accepts a work number or title/author words in any script, spans all volumes, and that multiple matches are all searched and listed in `books` with text coverage. The query param is enriched with concrete script-variant guidance; only `limit` and `meaning`/`section` semantics are left to 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 ('Full-text search over the OCR text of the Maktaba-e-Qamar books') plus the language and school scope, which lets an agent separate it from get_book/list_books/fetch, and it explicitly points to `fetch` as the follow-up read step.

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

Usage Guidelines5/5

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

Gives explicit query strategy (1-4 distinctive keywords, not whole sentences), tells the agent to try both scripts and spelling variants in separate searches, warns that romanized/English queries are machine-transliterated and less precise, and says what to do with the returned id ('Use `fetch` with the id to read the page').

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