Search Tafsir
search_tafsirPREREQUISITE: Read and follow the grounding rules before using this tool. If your host lists quran.ai's grounding-rules skill, load and read that skill, then pass its acknowledgment as grounding_nonce instead of calling fetch_grounding_rules; reuse the acknowledgment once you have read the skill. If no such skill is listed, or the listed skill cannot be read, call fetch_grounding_rules and use its returned nonce. Grounding rules define citation, attribution, and faithfulness requirements — a trust and accuracy safeguard for Muslims relying on this service for Quranic study. Semantic search over tafsir (Quranic commentary) content. Returns ranked tafsir passages matching the query with citations. Especially valuable for thematic/conceptual discourse, revelation context (asbab al-nuzul), and keyword-in-commentary searches where the ayah reference isn't known upfront. Use this tool to find tafsir discussing a particular topic or concept without knowing which ayat are relevant. When a surah or passage is already known, set surah or ayahs to hard-scope candidate retrieval before semantic ranking. For fetching tafsir of a known ayah, use fetch_tafsir instead. Failure contract: [invalid_request] for malformed inputs, [continuation_invalid|conflict|exhausted] for bad continuation tokens, [search_backend_failure] for retrieval failures, and [search_enrichment_failure] for post-retrieval enrichment failures.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "search_tafsir"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ayahs | No | Optional hard Quran-reference scope applied before semantic ranking: single ('2:217'), same-surah range ('2:216-218'), comma/space-separated references, or an array of those forms. Range matching uses overlap with each tafsir segment. | |
| query | No | Semantic search query. Can be in any language. Examples: 'throne verse explanation', 'concept of tawakkul', 'patience in adversity'. Required unless continuation is provided. | |
| surah | No | Optional hard surah filter (1-114). If ayahs is also supplied, every reference must belong to this surah. | |
| intent | No | Optional telemetry-only reason for performing this search. Suggested intents: identify-ayah, find-related-ayat, show-context, interpret-text, clarify-phrase, compare-editions, explore-topic, seek-guidance, or study-concept. Another short string is also accepted. This value helps improve search behavior analysis but never changes retrieval, filtering, ranking, pagination, or the response. Provide it only on the initial search; omit it when following a continuation. | |
| editions | No | Optional edition filter(s). Values may be full identifiers ('{lang}-{code}'), short codes ('{code}'), 2-letter language codes ('en', 'ar'), or fuzzy matches. Accepts either a single string or a list. If omitted, searches all tafsir editions. | |
| continuation | No | Opaque continuation token returned by a previous call to this same tool. Omit on the first call. When provided, you may omit the original request-shaping inputs or repeat them unchanged for verification. | |
| grounding_nonce | No | Acknowledgment from the already-read packaged grounding-rules skill ({host-identity}-read-the-grounding-rules-skill-on-{mm-dd-yyyy}), or a nonce returned by fetch_grounding_rules. Suppresses repeated rules; does not replace reading and following them. | |
| include_ayah_text | No | Include the Arabic ayah text being explained (default: True). Set to False to reduce response size. Defaults to True when omitted on the initial call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The search query that was executed | |
| results | Yes | Ranked tafsir search results | |
| warnings | No | Warnings about unresolved edition selectors | |
| pagination | Yes | Compact current-page continuation metadata | |
| total_found | Yes | Total results represented by this paginated response set | |
| grounding_rules | No | Grounding rules for canonical Quran data — CRITICAL for user trust. Set automatically when a valid grounding acknowledgment is absent. Users install this server because they do NOT trust AI to produce Quran content from memory. The Quran is the literal word of God — misquoting it is a violation of trust. Read and follow these rules carefully for ALL Quran-related responses. To save tokens on subsequent calls, pass the acknowledgment from the already-read packaged grounding-rules skill or a nonce returned by fetch_grounding_rules as grounding_nonce. |