Skip to main content
Glama

Wirdi MCP

A local MCP server for the Qaloun recitation (from Nafi'). You give it a passage of the Quran; it gives you back the Tajwid rules that apply to it, letter by letter, each with the page of the book that states the rule.

  • Version 0.6.0 · 12 tools · 97 rules · 97 detectors · 322 tests (289 on a clean clone, the rest also check the original Wirdi AI files)

  • Read-only and deterministic: no LLM, no RAG, no database, no network. The Quran text is read from the Wirdi AI files and never modified.

  • Nothing is scholarly verified. No qualified reviewer has been named, so every result is a candidate. The server never says more than that.

En français. Serveur MCP local (stdio) pour Qaloun d'après Nafi'. Vous donnez un passage ; il renvoie les règles de tajwid applicables (madd, hamza, tafkhim/tarqiq, idgham, ياءات الإضافة, noon/mim sakina, qalqala…), avec la lettre exacte, le contexte (waqf/wasl) et la page du livre cité. Aucune annotation n'est validée par un savant : le statut maximal est candidate. Requêtes prêtes à coller : docs/EXEMPLES_REQUETES.md (une par outil) et docs/APPLY.json (toutes). Pièges déjà rencontrés : docs/NoteImportant.md.

Contents

  1. How it works

  2. Quick start

  3. Key commands

  4. The 12 tools

  5. Selections and reading context

  6. What an annotation says

  7. All 97 rules

  8. Data and numbering

  9. Sources and where they disagree

  10. What is not covered

  11. Tests

  12. Repository layout and scripts

  13. What needs a human

  14. Documentation index


Related MCP server: Quranpedia MCP

1. How it works

 your request                                      the answer
 ───────────                                       ──────────
 selection (surah, ayah range)        ┌─────────►  annotations: rule, exact letters,
 + reading context (waqf / wasl)      │            note, variants, page, book citation
 + optional filter (family, rules)    │            + counts, unresolved, skipped, coverage
        │                             │
        ▼                             │
 1. check   the corpus SHA-256 matches the pinned one (fail closed)
 2. read    the unchanged ayat of the Qaloun corpus
 3. split   each ayah into words and letters, with reversible codepoint offsets
 4. detect  one deterministic detector per rule family reads the letters and their signs
 5. attach  rule record (hash-checked) → citation, page; the ayah's 559-page span
 6. report  what could not be decided: `unresolved` (missing context), `skipped` (out of scope)

Four ideas hold the design together:

Idea

What it means in practice

A candidate is not a verdict

Every annotation is candidate. Nothing is promoted without a named reviewer

The text decides, not an assumption

Detectors read the signs the corpus writes (maddah, small waw/yeh, sukun, shadda…); no Hafs rule is assumed

Several readings are listed, never chosen

Where a book allows 2, 3 or 4 harakat, variants shows all of them

Missing context is said, not guessed

A word-final letter at the end of a wasl selection is unresolved until you give the next ayah

2. Quick start

Requires Python 3.12+.

python3 -m venv .venv
.venv/bin/python -m pip install -e '.[dev]'
.venv/bin/wirdi-mcp          # waits for MCP input on stdin; no network listener

Variable

Purpose

(none needed)

The Quran text, the 559-page map and the mapping resolver are bundled in the package (src/wirdi_mcp/quran/snapshot/, SHA-256 pinned). A clean clone calls every tool

WIRDI_AI_ROOT

Optional. Path of a Wirdi AI checkout: the server then reads and verifies the original files instead of the snapshot

WIRDI_QURAN_SOURCE

Optional. none disables the Quran source: tools that read it return DATA_UNAVAILABLE and health_check shows quran_data: not_configured

WIRDI_KNOWLEDGE_ROOT

Another knowledge/ directory (default: this repository's)

WIRDI_MCP_LOG_LEVEL

Log level, written to stderr

WIRDI_TEST_SOURCE_ROOT

Tests only: enables the real-corpus tests

Use it from an MCP client (replace the paths):

{
  "mcpServers": {
    "wirdi": {
      "command": "/absolute/path/wirdi-mcp/.venv/bin/wirdi-mcp",
      "env": {"WIRDI_MCP_LOG_LEVEL": "INFO"}
    }
  }
}

Try it in the MCP Inspector.

npx @modelcontextprotocol/inspector .venv/bin/wirdi-mcp

Then call health_check: quran_data must be configured_unchecked and quran_source bundled. (The Inspector starts the server with a filtered environment: to set WIRDI_AI_ROOT, pass it with -e WIRDI_AI_ROOT=/path, not as a variable written before npx.) Ready-to-paste requests for every tool are in docs/EXEMPLES_REQUETES.md (one per tool) and docs/APPLY.json (all of them).

3. Key commands

I want to…

Command

Start the server

.venv/bin/wirdi-mcp

Check it works end to end

.venv/bin/python scripts/verify_local.py

Run the tests (bundled snapshot, real corpus included)

.venv/bin/python -m pytest

Also check against a Wirdi AI checkout

WIRDI_TEST_SOURCE_ROOT=/abs/wirdi-Ai .venv/bin/python -m pytest

Lint and format

.venv/bin/ruff check . && .venv/bin/ruff format --check .

Change a rule record

edit the table in scripts/build_book_a_rules.py, then python scripts/build_book_a_rules.py && python scripts/build_rule_manifest.py

Check the rule files against the manifest

.venv/bin/python scripts/build_rule_manifest.py --check

Count every rule over the 6,214 ayat

.venv/bin/python scripts/audit_rules.py --source-root /abs/wirdi-Ai

One correct JSON request per tool, run against the server

docs/EXEMPLES_REQUETES.md (rebuild: .venv/bin/python scripts/build_examples_md.py)

Build the local page store of a book

.venv/bin/python scripts/build_page_store.py <pdf> <edition-id>

After changing a rule or a detector, in this order: regenerate the records and the manifest → run both test suites → regenerate the audit (RULE_AUDIT.md).

4. The 12 tools

Every tool is read-only. A success is {status: "ok", data, provenance, validation_status, warnings}; a failure is {status: "error", error: {code, message, retryable}}.

Tool

You give

You get

health_check

nothing

Readiness and configuration; reads no data

get_qaloun_passage

selection

The unchanged ayat, their SHA-256 and their 559-page span

resolve_source_mapping

selection, target_corpus_id, target_corpus_version, target_numbering_system

Where the selection falls in another numbering (e.g. Kufian/Hafs), mapping_status, safe_for_source_retrieval

list_tajwid_rules

family?

The 97 rules: id, Arabic name, family, type, has_detector

get_tajwid_rule

rule_id, version

One rule record: definition, conditions, exceptions, limits, book and page

analyze_qaloun_tajwid

selection (1 to 100 ayat), reading_context, rule_ids?, families?, limit (≤500), offset

Candidate annotations, paged, with counts, unresolved, skipped, coverage

summarize_tajwid

surah, start_ayah?, end_ayah?, reading_context, rule_ids?, families?, limit, offset

Counts per rule and per ayah (≤300 ayat)

analyze_app_page

page (1 to 559), reading_context, rule_ids?, families?, limit, offset

Candidates for the ayat that begin on that page of the application layout

list_reading_combinations

selection, reading_context, max_combinations (≤500)

For each ayah with a madd or a plural meem, the readings that may be taken together, from the book's own tables (Nabhan pp.98-108); basis says whether the book lists the pair, extends it, or gives no table

get_letter_properties

letters (1 to 29 base letters)

Place of articulation and characteristics (Book A pp.40-45)

get_source_page

edition_id, page_start, page_end (≤5)

Raw text of pages from the local page store

search_source_pages

query (2 to 80 characters), edition_ids, limit

The pages that contain the word, with a normalised snippet

Error codes: INVALID_REFERENCE, NOT_FOUND, UNSUPPORTED_VERSION, DATA_UNAVAILABLE, INTEGRITY_FAILURE, UNSUPPORTED_CAPABILITY. A missing or altered store fails that one tool, typed; an error never contains a path or book text.

5. Selections and reading context

A selection is {"start": <reference>, "end_ayah": N}. A reference names the corpus:

{"corpus_id": "wirdi-ai:quranpedia:qalun",
 "corpus_version": "sha256:ece0a2b0efe44d496211c595d0a34f495413bc93f78fba8095a666e2048d1303",
 "numbering_system": "wirdi-ai:qalun-6214", "riwaya": "qaloun", "tariq": "unspecified",
 "surah": 2, "ayah": 5}

The reading context decides what a word-final letter does:

Field

Meaning

mode: "waqf"

The reading stops at the end of each selected ayah, and nowhere else. Inside an ayah the reading is continuous: a mim in the middle of an ayah is still read with the next word

mode: "wasl"

Continuous reading across the whole selection. The last position of the last ayah needs the next ayah, otherwise it is reported under unresolved

following

A complete reference to the next ayah of the same surah (for wasl), or null

stop_after_word

Stop the last ayah after that many words, to simulate a stop inside an ayah

Waqf-only rules (madd_arid_sukun, madd_lin, madd_iwad, madd_muttasil_arid, ra_mutatarrif_*) never fire in wasl. Waqf signs written inside an ayah are not treated as stops.

6. What an annotation says

Field

Content

rule_id, rule_version

Which rule

anchor

The ayah's SHA-256, the codepoint range into the unchanged text, the word index

reading_context

Waqf or wasl, and what was assumed

status

Always candidate

evidence

Book, edition and page of the rule (a source, never a verdict)

page_refs

The 559-page application span of the ayah

note

What the detector saw, in words

variants

The readings the book allows here; the engine never picks one

A short or empty result is not a claim that the passage has no other rule: only the rules you ask for are evaluated, and coverage says whether every position could be decided.

7. All 97 rules

Each rule is a short paraphrase written for this project, page-cited, unreviewed. Legend:

  • Type: A mechanical · B depends on the stop or on the neighbouring word · C a closed word list named by the book (matched on the book's own Kufian ayah numbers).

  • Detector: every rule has one. The two-hamza rules and part of the vowel-on-a-sakin-letter rule are found only at the places the farsh table of the longer book lists, because the Qaloun text keeps only the result.

  • Tariq: no rule names one. Book A attests Qaloun without naming a tariq, so every rule is unspecified.

Rule

Arabic name

Family

Type

Detector

Pages (Book A; 92 rules also cite the longer book, see the rule)

alef_ana_before_hamza

ألف أنا قبل همزة مفتوحة أو مضمومة

madd

B

yes

23, 24

alef_ana_before_hamza_kasra

ألف أنا قبل همزة مكسورة

madd

B

yes

24

alef_ana_dropped

حذف ألف أنا وصلا

madd

B

yes

23, 24

alef_thabita

الألفات الثابتة وقفا ووصلا

madd

C

yes

23, 24

madd_alif_lam_mim_imran

الم الله في فاتحة آل عمران وصلا

madd

C

yes

23

madd_arid_sukun

المد العارض للسكون

madd

B

yes

20

madd_badal

مد البدل

madd

A

yes

15, 16

madd_harf_hay_tahar

الألف في هجاء أحرف حي طهر

madd

A

yes

15, 17, 23

madd_iwad

مد العوض

madd

A

yes

15, 16, 17

madd_lazim_harfi_mukhaffaf

المد اللازم الحرفي المخفف

madd

A

yes

22, 23

madd_lazim_harfi_muthaqqal

المد اللازم الحرفي المثقل

madd

A

yes

22

madd_lazim_kalimi_mukhaffaf

المد اللازم الكلمي المخفف

madd

C

yes

21, 22

madd_lazim_kalimi_muthaqqal

المد اللازم الكلمي المثقل

madd

A

yes

21

madd_letter_dropped

حذف حرف المد لالتقاء الساكنين

madd

B

yes

24

madd_lin

مد اللين

madd

B

yes

20, 21

madd_munfasil

المد الجائز المنفصل

madd

A

yes

19

madd_muttasil

المد الواجب المتصل

madd

A

yes

19

madd_muttasil_arid

المد المتصل العارض

madd

B

yes

20

madd_sila_ha_exception

كلمات استثنيت من صلة هاء الضمير

madd

C

yes

18, 19, 20

madd_sila_kubra_ha

الصلة الكبرى في هاء الضمير

madd

A

yes

19, 20

madd_sila_kubra_meem

الصلة الكبرى في ميم الجمع

madd

A

yes

19, 20

madd_sila_sughra_ha

الصلة الصغرى في هاء الضمير

madd

A

yes

17, 18, 19

madd_sila_sughra_meem

الصلة الصغرى في ميم الجمع

madd

A

yes

17, 18

madd_tabii

المد الطبيعي

madd

A

yes

14, 15

noon_tawkid_khafifa_stop

الوقف على نون التوكيد الخفيفة المرسومة تنوينا

madd

C

yes

16, 17

hamza_arayta_tashil

تسهيل الهمزة الثانية في أرأيت وأرأيتكم وأرأيتم

hamza

C

yes

27

hamza_double_exception

استثناءات الهمزتين في كلمة

hamza

C

yes

26, 27

hamza_double_in_word

الهمزتان في كلمة

hamza

A

yes

26

hamza_ibdal_minsaa

إبدال الهمزة في منسأته

hamza

C

yes

25

hamza_ibdal_musada

إبدال الهمزة في مؤصدة

hamza

C

yes

25

hamza_ibdal_ruya

إبدال الهمزة في رئيا

hamza

C

yes

25

hamza_ibdal_saala

إبدال الهمزة في سأل

hamza

C

yes

25

hamza_ibdal_yajuj

إبدال الهمزة ألفا في يأجوج ومأجوج

hamza

C

yes

25

hamza_istifham_added

همزة الاستفهام المزيدة في ءامنتم وءأله

hamza

C

yes

27

hamza_istifham_before_article

همزة الاستفهام قبل همزة أل التعريف

hamza

C

yes

31

hamza_nabi

همز النبي ونحوها

hamza

C

yes

25, 26

hamza_nabi_exception

استثناء النبي في موضعي الأحزاب

hamza

C

yes

26

hamza_two_words_different

الهمزتان المختلفتان في كلمتين

hamza

C

yes

28, 29

hamza_two_words_same

الهمزتان المتفقتان في كلمتين

hamza

C

yes

27, 28

hamza_wasl_then_qat_in_word

اجتماع همزة الوصل وهمزة القطع في الكلمة

hamza

A

yes

16

hamza_waw_huzu_kufu

همز الواو في هزوا وكفوا

hamza

C

yes

25

hamzat_wasl_article

همزة الوصل في أل التعريف

hamza

A

yes

29, 31

hamzat_wasl_noun

همزة الوصل في الأسماء

hamza

C

yes

29, 30, 31

hamzat_wasl_verb

همزة الوصل في الأفعال

hamza

B

yes

30, 31

istifham_repeated_first

الاستفهام المكرر: ما أثبتت همزته في الأول

hamza

C

yes

27

istifham_repeated_second

الاستفهام المكرر: ما أثبتت همزته في الثاني

hamza

C

yes

27

sakin_before_hamzat_wasl

تحريك الساكن قبل همزة الوصل

hamza

B

yes

31

alef_tafkhim

تفخيم الألف

tafkhim_tarqiq

B

yes

32, 35

alef_tafkhim_after_ra

تفخيم الألف بعد الراء غير المقللة

tafkhim_tarqiq

A

yes

35

alef_tarqiq

ترقيق الألف

tafkhim_tarqiq

B

yes

35

ghunna_tafkhim

تفخيم الغنة

tafkhim_tarqiq

B

yes

35

ghunna_tarqiq

ترقيق الغنة

tafkhim_tarqiq

B

yes

35

istiala_rank_1

المرتبة الأولى من تفخيم الاستعلاء

tafkhim_tarqiq

A

yes

32

istiala_rank_2

المرتبة الثانية من تفخيم الاستعلاء

tafkhim_tarqiq

A

yes

32, 33

istiala_rank_3

المرتبة الثالثة من تفخيم الاستعلاء

tafkhim_tarqiq

A

yes

32, 33

istiala_rank_4

المرتبة الرابعة من تفخيم الاستعلاء

tafkhim_tarqiq

A

yes

32, 33

lam_jalala_tafkhim

تفخيم لام لفظ الجلالة

tafkhim_tarqiq

B

yes

34, 35

lam_jalala_tarqiq

ترقيق لام لفظ الجلالة

tafkhim_tarqiq

B

yes

34, 35

ra_jawaz

جواز الوجهين في راء فرق

tafkhim_tarqiq

C

yes

34

ra_mutatarrif_jawaz

جواز الوجهين في الراء المتطرفة

tafkhim_tarqiq

C

yes

34

ra_mutatarrif_tafkhim

تفخيم الراء المتطرفة

tafkhim_tarqiq

B

yes

34

ra_mutatarrif_tarqiq

ترقيق الراء المتطرفة

tafkhim_tarqiq

B

yes

34

ra_tafkhim

تفخيم الراء

tafkhim_tarqiq

B

yes

33, 34

ra_tarqiq

ترقيق الراء

tafkhim_tarqiq

B

yes

33, 34

ya_idafa_fath

فتح ياء الإضافة قبل الهمزة

ya_idafa

B

yes

45, 46, 47, 48, 49, 50

ya_idafa_fath_exception

ياءات الإضافة المفتوحة استثناء

ya_idafa

C

yes

50

ya_idafa_iskan_before_letter

ياءات الإضافة الساكنة قبل الحروف

ya_idafa

C

yes

47, 50

ya_idafa_iskan_exception

ياءات الإضافة الساكنة استثناء

ya_idafa

C

yes

46, 48, 49, 50

ya_idafa_maee

ياء الإضافة في كلمة معي

ya_idafa

C

yes

47

ya_idafa_rabbi_two_readings

ياء ربي في فصلت

ya_idafa

C

yes

46, 49

idgham_kabir_mutamathil

الإدغام الكبير المتماثل

idgham_general

C

yes

36

idgham_mutajanisayn

إدغام المتجانسين

idgham_general

A

yes

36, 37, 38

idgham_mutamathilayn

إدغام المتماثلين

idgham_general

A

yes

36

idgham_mutaqaribayn

إدغام المتقاربين

idgham_general

A

yes

38

idgham_naqis

الإدغام الناقص

idgham_general

C

yes

38, 39

idgham_bighunna

الإدغام بغنة

noon_sakina_tanween

B

yes

5, 6

idgham_bilaghunna

الإدغام بغير غنة

noon_sakina_tanween

B

yes

5

idhar_halqi

الإظهار الحلقي

noon_sakina_tanween

B

yes

4, 5

idhar_mutlaq

الإظهار المطلق

noon_sakina_tanween

C

yes

6

ikhfa_haqiqi

الإخفاء الحقيقي

noon_sakina_tanween

B

yes

7, 8

iqlab

الإقلاب

noon_sakina_tanween

B

yes

7

idgham_shafawi

الإدغام الشفوي

mim_sakina

B

yes

9

idhar_shafawi

الإظهار الشفوي

mim_sakina

B

yes

9, 10

ikhfa_shafawi

الإخفاء الشفوي

mim_sakina

B

yes

9

ghunna_mushaddad

غنة النون والميم المشددتين

ghunna

A

yes

11

qalqala

القلقلة

qalqala

A

yes

44

lam_qamariya

اللام القمرية

lam_taarif

A

yes

13

lam_shamsiya

اللام الشمسية

lam_taarif

A

yes

12, 13

imala_har

الإمالة في هار

imala_taqlil

C

yes

35

taqlil_tawrat

التقليل في التوراة

imala_taqlil

C

yes

35

ya_zaida_joined_kept

الياء الزائدة المثبتة وصلا المحذوفة وقفا

ya_zaida

C

yes

— (Nabhan 80, 81)

ya_zaida_kept_both

الياء الزائدة المثبتة وصلا ووقفا

ya_zaida

C

yes

— (Nabhan 80, 81)

ya_zaida_two_ways

الياء الزائدة بالوجهين وصلا

ya_zaida

C

yes

— (Nabhan 80, 81)

waqf_ayyuh

الوقف على أيه بالهاء

waqf

C

yes

— (Nabhan 82-86)

waqf_maqtu

الكلمتان المقطوعتان رسما

waqf

C

yes

— (Nabhan 82-86)

waqf_split_word

الكلمة المجزأة رسما

waqf

C

yes

— (Nabhan 82-86)

waqf_ta_open

الوقف على تاء التأنيث المبسوطة

waqf

C

yes

— (Nabhan 82-86)

Family

Rules

What it covers

madd

25

natural, badal, 'iwad, muttasil, munfasil, 'arid, lin, lazim, sila of the ha and meem, fixed alefs, alef of ana, light tawkid noon, الم الله

hamza

22

replaced hamzas, prophet words, two hamzas, repeated interrogatives, hamzat al-wasl, wasl then qat' in one word, أرأيت, hamza before the article

tafkhim_tarqiq

17

ra, lam of Allah, alef (also after ra), ghunna, the four ranks of the isti'la letters

ya_idafa

6

open and closed first-person ya, معي, ربي of Fussilat

waqf

4

stops that depend on the rasm: open ta, words written apart, أيه, a split word (from the longer book only)

ya_zaida

3

the zaida ya: kept when joined, kept or dropped, kept always (from the longer book only)

idgham_general

5

identical, same-place and close letters, naqis, the great idgham

noon_sakina_tanween

6

idhar, idgham, iqlab, ikhfa

mim_sakina, lam_taarif, imala_taqlil, qalqala

3 · 2 · 2 · 1

shafawi rules, article lam, taqlil and imala, qalqala

ghunna

1

geminated noon and meem

What the detectors read. A maddah marks the long madds; a superscript alef marks a madd alef; a small waw or yeh on a ha marks the sila; a sakin noon or meem before idgham, ikhfa and iqlab letters has no sukun; an alef inserted between two hamzas is a superscript alef; the open first-person ya is spelled with a fatha and the closed one with the yeh barree; hamzat al-wasl has three different marks.

8. Data and numbering

Datum

Origin

Guard

Quran text

KFGQPC Qaloun via Qur'anpedia (risan/quran-json, commit 6523a9ad…), 6,214 ayat, bundled in src/wirdi_mcp/quran/snapshot/ (CC BY-SA 4.0, see NOTICE)

SHA-256 checked on every call; never modified

559-page layout and mapping resolver

Same snapshot (page map derived from the King Fahd mushaf images; resolver code of the Wirdi AI project, trimmed schemas, short public notes)

SHA-256 checked; verified_against_edition

Rules

knowledge/rules/*/1.json

manifest.json pins every file; one altered byte gives INTEGRITY_FAILURE

Books

PDFs placed locally in docs/

Never committed; only paraphrased rules with a page citation are

The mushaf behind the page map. The 559-page layout is that of the Madinah Mushaf in the riwaya of Qaloun from Nafi', printed by the King Fahd Complex for the Printing of the Holy Qur'an (1427 H / 2006, 559 printed pages; the PDF used is listed at https://islamhouse.com/ar/books/5268, SHA-256 17bb037d84f3e344c35122eb9fcad72d9b751d6011ab10dd896176f8974e8309). It is not the 604-page layout and not the Tunisian Hannibal print. This repository holds only page numbers derived from that mushaf: for each ayah, the page where it begins and the page where it ends. The method is in src/wirdi_mcp/quran/snapshot/docs/qaloun-pagination-validation.md (verse-end markers and surah banners detected on the page images, without OCR, checked against the verse counts and the printed index). No scan, image, page text, font or glyph of the mushaf is included or distributed. The mushaf is a copyrighted publication; the page numbers are facts about its layout, but whether to publish them is the repository owner's decision, and they can be replaced by another verified map without touching the code (qaloun_pagination_verified.json, pinned by SHA-256).

Licences. The code, tests, scripts and docs are MIT (LICENSE). The folder src/wirdi_mcp/quran/snapshot/ keeps its own terms (LICENSE-DATA): the Quran text is CC BY-SA 4.0 with credit to Qur'anpedia.net and the dump version; ShareAlike applies to that data, not to the code that reads it. The books themselves are never in the repository.

Two numberings meet here.

Qaloun count

Kufian count

Used by

the corpus, the tools, the application

the place numbers of Book A

Ayat

6,214

6,236

Kept in the corpus as

the ayah number

number_in_hafs

Pages

559 (application)

604 (Hannibal)

78 Qaloun ayat gather two Kufian numbers and 59 Kufian ayat are split, touching 59 surahs. In Al-Baqara: Qaloun 2:5 = Kufian 2:6, Qaloun 2:7 = 2:8. Convert with resolve_source_mapping. Pages are never compared by number, only through the verse.

9. Sources and where they disagree

Source

Role

State

Book A, أحكام رواية قالون عن نافع المدني (51 pp.)

The base of 90 of the 97 rules; Qaloun, names no tariq

Citations checked on the page images; inconsistent in places (below)

Nabhan, الثمر اليانع في أصول رواية قالون عن نافع (214 pp.)

The longer book Book A digests; names Abu Nashit (p.111 only). Second citation of 92 rules, sole source of the 3 ya_zaida rules

Pages read on their images; local, never committed; see BOOK_NABHAN_EVALUATION

Book A has an unknown licence (it is never committed). Its text layer is raw (inverted lam-alef ligatures).

Where Book A contradicts itself or the corpus (each case is in the rule limits and in BOOK_A_COVERAGE; none is arbitrated):

Case

What happens

فألقه (p.19 against p.20), يأته

Both readings are in variants

آلآن (p.21)

Three readings in variants

Ya'at lists (p.46 against p.49)

Four place numbers differ; each word was looked up in the corpus and the retained place is documented. The longer source book shows two are Book A's own slips and the others inherited

معي (p.47)

The book's sentence is the reverse of the corpus spelling and of its own classes, and differs from the longer book it digests (Nabhan p.79); each occurrence reports what the corpus spells

Plural meem before ba and meem (1,314 places)

Sila by the general wording of p.17; its exclusion of ikhfa/idgham shafawi is an inference, written in both annotations

Madd lengths

A reviewer proposes 2 or 4 (munfasil) and 4 (muttasil); Book A says 2, 3 or 4 and 3 or 4. Open

10. What is not covered

  • Most waqf and ibtida rules (the chosen stops, rawm, ishmam, pp.87-98 of the longer book) and waqf signs inside an ayah: the engine stops only at an ayah end. Only the closed lists that depend on the rasm are built (waqf_*).

  • The vowel of sakin letters before hamzat al-wasl, and two hamzas in two words, outside the places the farsh table lists (19 and 82 places the corpus shows).

  • The default closed ya before an ordinary letter, beyond the seven named examples.

  • Everything Book A does not say (it is a 51-page summary).

BOOK_A_COVERAGE lists each section of the book and its state.

11. Tests

.venv/bin/python -m pytest                                          # everything, on the bundled snapshot
WIRDI_TEST_SOURCE_ROOT=/abs/wirdi-Ai .venv/bin/python -m pytest    # + checks against the original files: 322 tests
  • Synthetic and stdio: synthetic fixtures modelled on the books' examples, real stdio subprocess tests, the README and APPLY.json consistency checks, tamper tests.

  • Real corpus (bundled): every single-ayah selection in both modes, all 559 pages, the closed word lists (each must hit exactly the places the book names), and every request of docs/APPLY.json.

12. Repository layout and scripts

src/wirdi_mcp/
  server.py, config.py        entry point and configuration
  domain/                     typed contracts (Pydantic): annotations, statuses, references
  quran/                      checksum-pinned, read-only access to the Wirdi AI files
  mapping/                    the mapping authority (Qaloun <-> Hafs)
  knowledge/                  rule registry (hash-pinned) and local page store (fail-closed)
  tajwid/                     tokenizer and detectors: madd, hamza, tafkhim, idgham, yaat,
                              lexicon (word lists), letters (static tables), engine, service
  tools/                      the 12 MCP tools and their contracts
knowledge/rules/              97 rule records + manifest.json     (committed)
knowledge/sources/            edition metadata only               (no book text)
knowledge/validation/         empty, ready for a reviewer's records
scripts/                      rule generation, manifest, audit, page store, local check
tests/                        unit and integration tests
docs/                         design, audits, reports, guides and APPLY.json (PDFs are git-ignored)

The commands that use the scripts are in section 3.

13. What needs a human

  1. A named, qualified reviewer. Without one, nothing moves beyond candidate; the validation store is ready and empty.

  2. Licences of the books (the code and bundled data are licensed, see section 8), and whether the paraphrased records may stay in the repository.

  3. Which tariq? Book A names none; the corpus does not attest one either.

  4. Display in version 1: label unreviewed candidates, or show nothing until a reviewer approves?

  5. Arbitration of the divergences in section 9, with the reviewer.

  6. Integration into Wirdi AI (not started): INTEGRATION.

14. Documentation index

Document

Contents

EXEMPLES_REQUETES

Start here to test in the Inspector: one verified JSON request per tool (12), to paste into « Edit as JSON »

APPLY.json

The full set of 40 requests, errors and edge cases included, with the expected result; checked by a test

NoteImportant

Inspector setup, data origin, every test done and its analysis

TESTING_GUIDE

A request per rule family and what to check

BOOK_A_COVERAGE

Each Book A section, its rules, its state and the page contradictions

MCP_TOOLS

Tool contracts, statuses, reading context, failure semantics

TAJWID_ENGINE

Rule, detector, annotation and review, kept separate

RULE_AUDIT

Per-rule counts over the whole corpus

ARCHITECTURE, SOURCE_AUDIT

Boundaries, reference identity, the corpus and its checksums

DECISIONS

Design decisions

BOOK_NABHAN_EVALUATION

Assessment of a second, longer Qaloun book: what it settles in Book A and what it could add

INTEGRATION

The planned client contract for Wirdi AI

The official mcp Python SDK is pinned to 2.3.0; this project uses its MCPServer API, not the separate fastmcp package.

Available Tools

12 tools
analyze_app_pageC
Read-onlyIdempotent

Candidates for the ayat that begin on a page of the verified 559-page Qaloun layout.

NameRequiredDescriptionDefault
pageYes
limitNo
offsetNo
familiesNo
rule_idsNo
reading_contextYes

Output Schema

NameRequiredDescription

No output parameters

TDQS

C2.2/5.0
Behavior2/5

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

Annotations already state readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered. The description contributes almost nothing beyond that: it does not explain pagination via limit/offset, what the candidate set contains, or that results depend on the reading_context, and the existing output schema is not referenced. 'Candidates' is the only behavioral signal, and it is unexplained.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single noun phrase with no waste, but brevity here reflects under-specification rather than economy: for a six-parameter tool with a nested ReadingContext it gives the agent nothing to act on. A verb-first sentence stating what is returned would cost little and add much.

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

Completeness1/5

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

For a tool with a nested object schema, six parameters, and a paginated result (limit/offset), a one-line fragment is far short of what an agent needs to invoke it correctly, despite the output schema covering return shape. Neither the reading mode semantics nor the filtering parameters are addressed anywhere.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry parameter meaning, yet it only implicitly corresponds to the page parameter ('a page of the verified 559-page Qaloun layout'). reading_context with its wasl/waqf modes, stop_after_word, families, rule_ids, limit and offset are all left undocumented in both schema and description.

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

Purpose3/5

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

The fragment does identify the resource (ayat that begin on a page of the 559-page Qaloun layout) and hints at a candidate-generation result, but it never states a verb and never explains what 'candidates' means or how the output differs from siblings like analyze_qaloun_tajwid or get_qaloun_passage. An agent can guess the domain but not the operation.

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

Usage Guidelines2/5

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

There is no when-to-use guidance at all: no conditions, no prerequisites, no mention of the alternative siblings (get_qaloun_passage, analyze_qaloun_tajwid, summarize_tajwid) that an agent would have to choose between. Usage is only implied by the tool name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

analyze_qaloun_tajwidB
Read-onlyIdempotent

Candidate Tajwid occurrences for 1 to 100 Qaloun ayat, paged, each with its citations.

NameRequiredDescriptionDefault
limitNo
offsetNo
familiesNo
rule_idsNo
selectionYes
reading_contextYes
include_candidatesNo

Output Schema

NameRequiredDescription

No output parameters

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so safety is covered. The description adds real context beyond that: results are 'candidate' occurrences rather than final verdicts, they are paged, and each carries its citations. It does not explain what paging means in practice or what the 1-100 ayat bound implies for behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One compact sentence, front-loaded with the returned artifact and finished with the scope and pagination qualifiers. No filler and nothing buried.

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

Completeness2/5

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

This is a 7-parameter tool with nested selection and reading-context objects and no schema documentation at all. The description covers the output shape and the ayat cap but leaves the input surface, including the wasl/waqf distinction that drives Tajwid analysis, entirely to the agent's guesswork. An output schema exists, so return-value detail is rightly omitted, but the input gaps are too large for a tool of this complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 7 parameters, so the description carries the full burden and largely fails. 'Paged' gestures at limit/offset and '1 to 100 ayat' at the selection size, but families, rule_ids, include_candidates, and the entire reading_context (wasl vs waqf mode, preceding/following references, stop_after_word) go unexplained.

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 the resource precisely: candidate Tajwid occurrences for a Qaloun ayat range, paged, each carrying citations. That is specific enough to distinguish it from get_tajwid_rule or list_tajwid_rules, though it never contrasts itself with summarize_tajwid, which sounds like the closest sibling.

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

Usage Guidelines2/5

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

There is no when-to-use guidance and no named alternative. The word 'candidate' hints that results are unconfirmed and that summarize_tajwid might be the aggregation path, but the agent must infer that; nothing states prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_letter_propertiesB
Read-onlyIdempotent

Place of articulation and characteristics of 1 to 29 Arabic letters (Book A pp.40-45).

NameRequiredDescriptionDefault
lettersYes

Output Schema

NameRequiredDescription

No output parameters

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive, and closed-world, so the safety profile is covered. The description adds the meaningful constraint of a 1-29 letter batch and the source provenance (Book A pp.40-45), but says nothing about what happens with letters outside the range or unsupported characters.

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?

A single compact phrase with the scope constraint and source citation front-loaded; nothing is wasted. It is a fragment rather than a sentence, which is efficient but reads slightly telegraphic.

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

Completeness3/5

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

An output schema exists, so return values need no explanation, and the tool is a simple one-parameter read. Still, for a mutation-free lookup with 0% schema coverage on its only parameter, the input format for `letters` should have been stated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry the load for the single `letters` parameter. It clarifies that the input is Arabic letters and caps the count at 29, but a string array with maxLength 512 leaves unresolved whether entries are single Arabic characters, transliterations, or letter names.

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 resource and specifies exactly what is returned: place of articulation and characteristics for Arabic letters, scoped to Book A pp.40-45. The verb is only implicit (the tool name supplies 'get'), but the content is distinct from siblings like get_tajwid_rule or get_qaloun_passage.

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

Usage Guidelines2/5

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

There is no when-to-use guidance and no mention of alternatives such as get_tajwid_rule or analyze_qaloun_tajwid, so an agent must infer selection from the content noun phrase alone. The 1-29 letter bound hints at batch usage but is not framed as guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_qaloun_passageB
Read-onlyIdempotent

Read unchanged Qaloun ayat and verified page spans from checksum-pinned source files.

NameRequiredDescriptionDefault
selectionYes

Output Schema

NameRequiredDescription

No output parameters

TDQS

B3.2/5.0
Behavior4/5

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

The annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint=false, so safety and idempotency are covered. The description adds meaningful behavioral context by stating that content is 'unchanged' and comes from 'checksum-pinned source files', which discloses provenance and integrity guarantees beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single front-loaded sentence with no filler or redundant restatement. Every phrase contributes either the verb, the resource, or the integrity scope.

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

Completeness2/5

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

The tool requires a nested reference object with corpus identifiers, numbering system, riwaya, tariq, surah, ayah, and end_ayah, but the description does not explain how to supply or interpret these fields. The output schema reduces the need to describe return values and annotations cover safety, but the input guidance remains inadequate for this complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It only vaguely implies ayat and page spans and gives no meaning for the nested selection fields such as start, end_ayah, corpus_id, corpus_version, numbering_system, riwaya, tariq, surah, or ayah.

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 uses a specific verb, 'Read', and names a specific resource, 'Qaloun ayat and verified page spans', plus its source, 'checksum-pinned source files'. It does not explicitly distinguish this tool from siblings such as get_source_page or analyze_qaloun_tajwid, but the purpose itself is clear.

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

Usage Guidelines2/5

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

The description provides no explicit when-to-use or when-not-to-use guidance. It does not mention alternatives like get_source_page, search_source_pages, or analyze_qaloun_tajwid, so an agent must infer when this passage-specific reader is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_source_pageA
Read-onlyIdempotent

Read 1 to 5 pages of a locally placed source book (printed page numbers).

NameRequiredDescriptionDefault
page_endYes
edition_idYes
page_startYes

Output Schema

NameRequiredDescription

No output parameters

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, closed-world, non-destructive behavior, so the safety profile is covered. The description still adds real value beyond that: the 1-to-5 page cap (which the schema does not enforce) and the fact that page numbers are printed-edition numbers rather than file or scan indices. It stops short of saying what happens if the range exceeds 5 or the pages are missing from the local copy.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One sentence, front-loaded with the verb and resource, with the two most decision-relevant constraints (page cap, printed numbering) in parentheses. Nothing is redundant or padded.

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

Completeness3/5

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

An output schema exists, so return values need no explanation, and annotations cover the safety semantics. However, for a tool with three required parameters at 0% schema coverage, the description leaves the origin and format of edition_id unspecified and does not say how out-of-range or unavailable pages are handled.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry the load, and it only partially does: it clarifies the page_start/page_end range semantics via "1 to 5 pages" and "printed page numbers." It says nothing about edition_id — where an agent obtains a valid value or what editions exist — which is the parameter most likely to cause a failed call.

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 pairs a specific verb ("Read") with a specific resource ("pages of a locally placed source book") and adds scoping detail (1 to 5 pages, printed page numbers). That is enough to separate it from retrieval-style siblings like search_source_pages or get_qaloun_passage, although no sibling is named explicitly.

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?

The phrase "locally placed source book" plus "printed page numbers" implies the context in which this is the right tool (as opposed to a search or app-page tool), but the description never states when to choose it over search_source_pages or analyze_app_page, and gives no preconditions such as needing a resolved edition id.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_tajwid_ruleB
Read-onlyIdempotent

Read a local Tajwid rule record with its page-level citations (unreviewed).

NameRequiredDescriptionDefault
rule_idYes
versionYes

Output Schema

NameRequiredDescription

No output parameters

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description adds two genuinely useful facts beyond them: results carry page-level citations and are flagged "(unreviewed)", signalling data provenance/quality. It stays silent on what happens when rule_id+version match nothing and on the size of a returned record.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single tightly written sentence with the resource first and the qualifier "(unreviewed)" placed where it is immediately visible. Nothing is padded or repeated from the schema.

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

Completeness3/5

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

An output schema exists, so return-value explanation is rightly omitted, and annotations carry the safety semantics. The remaining gap is the complete absence of information on how to supply the two required keys, which for a two-required-param lookup is a meaningful shortfall.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and both parameters are required, yet the description says nothing about rule_id or version — no format, no hint that version identifies a Tajwid edition, no pointer to a tool that yields valid values. With low coverage the description should compensate, and it does not.

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+resource ("Read a local Tajwid rule record") plus what is attached (page-level citations), which separates it from list_tajwid_rules (collection) and analyze_qaloun_tajwid (analysis). The word "local" hints at a distinction from a remote/source counterpart, but no sibling is named explicitly.

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

Usage Guidelines2/5

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

There is no statement of when to call this rather than list_tajwid_rules, get_source_page, or analyze_qaloun_tajwid, and no prerequisites or exclusions. The only steer is implicit in the word "local" and the singular "record", leaving the agent to infer it from the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

health_checkA
Read-onlyIdempotent

Report process readiness and configuration, without accessing source or private data.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
statusNo
mappingNo
quran_dataNo
quran_sourceNo
schema_versionNo
available_toolsNo
service_versionNo
tajwid_analysisNo
validation_statusNo

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already carry the full safety profile (readOnly, idempotent, non-destructive, closed-world), so the description's marginal contribution is the disclosure that it touches no source or private data — a real guarantee an agent can rely on when deciding it is safe to probe. It does not add anything about latency, caching, or what 'configuration' surfaces, so it is useful but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One short sentence, front-loaded with the action and resource, with the security scope riding immediately behind it. No filler, no restatement of the name beyond what is needed.

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 zero parameters, rich annotations and an output schema defining return values, the description only needed to establish purpose and safety, which it does. The one residual gap is that 'configuration' is left vague about which settings are reported, but the output schema covers that.

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?

The tool takes zero parameters, which is the baseline-4 case: there is nothing for the description to disambiguate and no schema gap to compensate for.

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?

A concrete verb-plus-object ('Report process readiness and configuration') tells the agent exactly what is returned, and the scope clause 'without accessing source or private data' separates it from the content-fetching siblings like get_source_page or search_source_pages. It stops short of naming any sibling explicitly, so differentiation is inferred rather than stated.

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?

Usable context is only implied: an agent reads 'process readiness' as a pre-flight check before calling the Quran/tajwid content tools. There is no explicit when-to-use rule, no stated preconditions (e.g. call before other tools), and no mention of alternatives or when not to call it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_reading_combinationsD
Read-onlyIdempotent

Which readings of the madds may be taken together in each ayah (the book's tables).

NameRequiredDescriptionDefault
selectionYes
reading_contextYes
max_combinationsNo

Output Schema

NameRequiredDescription

No output parameters

TDQS

D1.8/5.0
Behavior2/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint=false, so the safety profile is covered. Beyond that the description adds nothing: no mention of the max_combinations cap, how wasl vs waqf modes affect results, or what 'the book's tables' means as a data source.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single short sentence, but brevity here is under-specification rather than economy. The trailing parenthetical '(the book's tables)' consumes space without clarifying anything actionable.

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

Completeness1/5

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

The tool takes two required nested objects with enums and constraints and exposes a complex recitation-domain result, yet the description covers none of that. An output schema exists, so return values need not be explained, but the invocation contract is wholly absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the description explains none of the three parameters. The most consequential inputs — reading_context.mode (wasl/waqf), basis, following/preceding QalounReference, stop_after_word, and max_combinations — are entirely undocumented, leaving an agent unable to construct a valid call from the description.

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

Purpose3/5

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

The description indicates the resource — combinations of madd readings permitted together within each ayah — but supplies no verb and leans on domain jargon ('madds', 'the book's tables') that an agent without tajwid background cannot resolve. It does not differentiate this from siblings such as analyze_qaloun_tajwid or get_tajwid_rule.

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

Usage Guidelines1/5

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

There is no when-to-use guidance, no statement of prerequisites, and no named alternative among the eleven sibling tools. The agent is left to guess whether this complements or duplicates analyze_qaloun_tajwid.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_tajwid_rulesB
Read-onlyIdempotent

List the available local rules and whether a detector exists for each.

NameRequiredDescriptionDefault
familyNo

Output Schema

NameRequiredDescription

No output parameters

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered. The description adds one genuinely new fact beyond that — the result includes detector availability per rule, i.e. coverage metadata rather than rule definitions. It does not say anything about ordering, filtering behavior, or what happens when a family has no rules, but with rich annotations this is acceptable.

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?

One short sentence, front-loaded with the action and scoped by a second clause that carries real information. No filler, though the phrasing 'available local rules' is slightly compressed at the cost of clarity.

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

Completeness3/5

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

An output schema exists, so return values need not be described, and the annotations cover safety. What is missing for a simple enumeration tool is the meaning of the optional family filter and any hint about how this listing relates to the analysis tools in the sibling set.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There is a single optional parameter, 'family', with 0% schema description coverage, and the description never mentions it. An agent reading only the description would not know it can scope the listing by family, nor what values 'family' accepts; the description should compensate for the missing schema documentation and does not.

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?

States a specific verb (list) and resource (local tajwid rules) plus an unusual detail — it reports whether a detector exists for each rule — which an agent can use to distinguish it from get_tajwid_rule. It stops short of explicitly naming that sibling, and 'local rules' is slightly ambiguous (local to what?).

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

Usage Guidelines2/5

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

There is no guidance on when to call this versus get_tajwid_rule or analyze_qaloun_tajwid; the agent must infer that this is a discovery/enumeration step. Nothing indicates whether it is meant as a first call to see coverage before running an analysis.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

resolve_source_mappingC
Read-onlyIdempotent

Reuse the pinned mapper; review-required ranges are unsafe for source retrieval.

NameRequiredDescriptionDefault
selectionYes
target_corpus_idYes
target_corpus_versionYes
target_numbering_systemYes

Output Schema

NameRequiredDescription

No output parameters

TDQS

C2.2/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, and non-destructive, so the safety profile is covered. The description adds real value by noting the mapper is pinned/reusable and that some ranges are flagged review-required and unsafe for retrieval, but it does not explain what 'pinned' or 'review-required' concretely mean in the output.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single short sentence, but brevity here comes from under-specification rather than economy; the front-loaded clause 'Reuse the pinned mapper' is cryptic and consumes the position where the actual purpose should sit.

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

Completeness2/5

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

An output schema exists, so return values need not be described, but for a four-parameter nested mapping tool with an opaque purpose the description leaves the core contract unstated. Too little context for an agent to invoke it confidently.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All four required parameters (selection, target_corpus_id, target_corpus_version, target_numbering_system) have 0% schema description coverage, and the description never mentions any of them. It does not clarify that the selection is a source passage and the target_* fields describe the destination corpus, so the crucial source-to-target semantics must be guessed.

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

Purpose2/5

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

The sentence names a 'pinned mapper' and 'source retrieval' but never states the actual operation: resolving a Qaloun passage selection into a target corpus/numbering system. An agent cannot infer from this that it converts references across corpora, nor how it differs from get_qaloun_passage or get_source_page.

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

Usage Guidelines2/5

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

'review-required ranges are unsafe for source retrieval' hints at a when-not condition, but it is vague and names no alternative tool or fallback behavior. There is no positive guidance on when to call this instead of the sibling retrieval tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_source_pagesB
Read-onlyIdempotent

Literal Arabic search over locally placed source pages; returns page hits only.

NameRequiredDescriptionDefault
limitNo
queryYes
edition_idsYes

Output Schema

NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare the safety profile: read-only, idempotent, non-destructive, and closed-world. The description adds useful behavioral context beyond that by specifying the search is literal rather than semantic/fuzzy, is limited to locally placed pages, and returns page hits rather than full page content.

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?

The definition is a single front-loaded sentence with no filler. It is appropriately compact, though the extreme brevity leaves important parameter details unstated elsewhere in the definition.

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

Completeness3/5

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

The presence of annotations and an output schema reduces what the description must cover. Still, for a tool with three parameters and zero schema description coverage, the description is incomplete because edition_ids and limit receive no explanation, and sibling alternatives are not addressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the burden of explaining parameters. It gives some meaning to query by calling it a literal Arabic search, but it does not explain edition_ids, its required status, or the limit parameter and its default.

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 uses a specific verb and resource: "search" over "source pages." It also narrows the operation to "literal Arabic" search and says it returns "page hits only," which distinguishes it from a content-retrieval sibling like get_source_page.

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?

The phrasing implies when this tool is appropriate: literal Arabic lookup across locally placed source pages. However, it does not explicitly compare against get_source_page or other siblings, nor does it state when not to use this search.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

summarize_tajwidC
Read-onlyIdempotent

Per-rule candidate counts for a surah or an ayah range, with per-ayah counts (paged).

NameRequiredDescriptionDefault
limitNo
surahYes
offsetNo
end_ayahNo
familiesNo
rule_idsNo
start_ayahNo
reading_contextYes

Output Schema

NameRequiredDescription

No output parameters

TDQS

C2.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive, and closed-world, so the safety profile is fully covered. The description adds one genuinely useful behavioral fact — that results are paged and broken down per-ayah as well as per-rule — but says nothing about ordering, total counts, or what happens at range boundaries.

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?

One short sentence, front-loaded with the output type and scope, with no wasted words. Brevity here shades into under-specification rather than verbosity, but the structure itself is clean.

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

Completeness2/5

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

An output schema exists, so return values need not be described, but the tool has 8 parameters including a required nested reading_context and zero schema documentation. A single clause cannot make an agent confident about how to set reading_context or the families/rule_ids filters before calling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage across 8 parameters, the description carries the full explanatory burden and mostly fails. It only implies surah, ayah range, and paging; the required reading_context object (mode/basis/preceding/following), plus families and rule_ids filters, are never mentioned or explained anywhere in prose.

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

Purpose3/5

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

The description names a specific output ('per-rule candidate counts') and scope ('a surah or an ayah range'), which is more than a tautology. However, 'candidate counts' is unexplained jargon and the description never distinguishes this tool from the sibling analyze_qaloun_tajwid, so an agent cannot confidently pick between them without opening both schemas.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no exclusions, and no mention of alternatives. It does not tell the agent whether this is a light summary versus the heavier analysis performed by analyze_qaloun_tajwid, nor what preconditions (e.g., a known corpus/reading context) must hold.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 12 tool updatesv0.6.0
    • First observedanalyze_app_page
    • First observedanalyze_qaloun_tajwid
    • First observedget_letter_properties
    • First observedget_qaloun_passage
    • First observedget_source_page
    • First observedget_tajwid_rule
    • First observedhealth_check
    • First observedlist_reading_combinations
    • First observedlist_tajwid_rules
    • First observedresolve_source_mapping
    • First observedsearch_source_pages
    • First observedsummarize_tajwid

TDQS

B3/5.0

Scored across 12 tools

Disambiguation4/5

Most tools target clearly distinct resources: passage retrieval, rule lookup, analysis, summarization, source pages, letter properties. The main potential confusion is between analyze_qaloun_tajwid and analyze_app_page (both return candidate occurrences, differing only in scope), and get_qaloun_passage vs get_source_page, but the descriptions clarify the boundaries.

Naming Consistency4/5

The set follows a consistent verb_noun snake_case pattern (get_*, list_*, analyze_*, summarize_*, search_*, resolve_*). health_check is the sole outlier using a noun_verb form, though it is a widely recognized convention.

Tool Count5/5

12 tools is a well-scoped surface for a specialized Tajwid/Qaloun analysis server, with retrieval, analysis, summarization, and diagnostic operations each earning a place.

Completeness4/5

The surface covers passage retrieval, rule listing/lookup, candidate analysis, summarization, source page access/search, letter properties, and reading combinations. Minor gaps exist, such as no explicit surah/ayah metadata listing or a way to search within Tajwid rule records, but core workflows are covered.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Validates Arabic Quran recitations for single verse, full surah, juz, page, or any consecutive verse range, supporting standard Arabic, Uthmani script, and full tashkeel validation.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides AI clients with fast, hallucination-free access to the Quran through 13 MCP tools, covering search, navigation, morphology, tafsir, translations, and surah background over stdio and Streamable HTTP.
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    Provides read-only access to Quranic verses and tafsir from Dorar, enabling retrieval of ayahs, surah tafsir, and search over tafsir content through MCP tools via a Streamable HTTP endpoint.
    -
  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables AI assistants to retrieve canonical Quran text, translations, scholarly tafsir, full-text search, and word-level morphology from verified Quran data.
    -