Skip to main content
Glama
This connector has been deprecated

Check whether a quotation occurs in the library

shamela_verify_quote
Read-onlyIdempotent

Checks whether an Arabic quotation occurs in the classical library and where: book, author, printed volume/page, edition, and whether the words are in the main text or in an editor's footnote. Use it on a passage an assistant quoted from memory. Matching ignores diacritics, tatweel and alef forms; exact says whether the page spells the words as given, and differences says how they differ. "not_found" means not found in the searched scope (the scope or bookId is named in the answer), not that the quotation is false or appears nowhere. matchedIn "foot" is the editor's words, not the author's. It reports where words are printed; it is not a ruling and does not say whether a passage is authentic. Needs at least 3 Arabic words; a shorter or non-Arabic quote returns a tool error naming the fix. Give scope or bookId to narrow it; with neither, the whole library is searched.

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": {
      "quote": "<quote>"
    },
    "name": "shamela_verify_quote"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum matching pages to return (max 10).
quoteYesThe Arabic wording to look for, at least 3 words, as quoted; diacritics are optional.
scopeNoOptional shelf to search. Ignored when bookId is given. 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
bookIdNoOptional: search this one book (Shamela's book id, as in a result's bookId). Wins over scope.

Output Schema

NameRequiredDescriptionDefault
noteNoThe caveats to carry with the verdict.
matchesNoUp to `limit` pages, in the library's order; empty when not_found.
verdictNofound: pages in the searched scope carry the words in this order. not_found: none does, in that scope only; never a statement that the quotation is false.
searchedNoWhat was searched. Carry it with any not_found.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / matches / items / properties / sourceUrl / description
      Previous value: -"The same page on shamela.ws."New value: +"The same page in the Quran Gallery Maktabah reader."
  2. Added

TDQS

A4.3/5.0
Behavior5/5

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

Well beyond the readOnly/idempotent annotations, it explains matching normalization (diacritics, tatweel, alef forms), what 'exact' and 'differences' mean, that matchedIn 'foot' is the editor's words not the author's, and the critical caveat that 'not_found' means only not-found-in-scope. It also discloses the preconditions (3+ Arabic words) and the error behavior with the fix named, plus the epistemic limit ('not a ruling', 'does not say whether a passage is authentic').

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 outcome and immediately followed by the when-to-use sentence; every caveat after that (not_found semantics, foot vs. text, authenticity disclaimer) carries decision-relevant weight. The disclaimer is stated twice in near-equivalent wording ('not that the quotation is false' / 'not a ruling'), which is the only wasted space.

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 verification tool with four parameters, an output schema, and full annotation coverage, nothing an agent needs before calling is absent: purpose, preconditions, error behavior, scope defaults, and the interpretation of the ambiguous result fields are all present. The output schema handles the return shape, and the description covers the parts of the result most likely to be misread.

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 coverage is 100%, so the structured fields already carry the parameter definitions and the scope enum. The description adds real operational meaning on top: the precedence rule is restated in behavioral terms, the no-parameter default (whole library searched) is spelled out, and the 3-word minimum is framed as a hard error with a fix rather than a silent filter.

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 gives a specific verb and resource ('Checks whether an Arabic quotation occurs in the classical library') plus the shape of the answer (book, author, volume/page, edition, main text vs. footnote). It implicitly separates itself from the keyword-search siblings by framing the use case as verifying a passage quoted from memory, but it never names those siblings the way a 5 would.

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?

'Use it on a passage an assistant quoted from memory' states the triggering situation clearly, and the closing sentence explains the scope/bookId narrowing decision and the default (whole library). It stops short of naming an alternative tool or stating when not to use this one.

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