Skip to main content
Glama

quran.ai

Fetch Tafsir Commentary

fetch_tafsir
Read-onlyIdempotent

PREREQUISITE: 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. Use the mufassir or edition explicitly requested by the user when its edition ID is already verified; look up an unknown ID instead of guessing. Otherwise choose the tafsirs best suited to this question using the shared tafsir guide or an available catalogue. IDs from the guide can be used directly. Use list_editions(edition_type='tafsir') for unknown IDs, additional selection information, or checking current availability when needed; it is not a prerequisite. Do not reuse a source automatically because it served a previous question. Do not limit yourself to the user's language — Arabic tafsir editions often contain richer scholarship. Fetch the most authoritative source regardless of language and translate the result yourself. Retrieve full canonical tafsir text for one or more ayat. Use when the user asks for tafsir, explanation, commentary, interpretation, or context and the requested canonical tafsir text for an ayah or ayat is not already in your context via dynamic context or prior tool calls. Failure contract: [invalid_request] for malformed inputs, [not_found] when requested canonical data is absent, [service_unavailable] when the required runtime resource is unavailable, [continuation_invalid|tampered|expired|conflict|exhausted] for bad continuation tokens. Protected retrieval also returns [rate_limited] or [server_busy] with retry guidance, and [request_too_large] when a selection exceeds 300 ayahs or 1,000 resolved ayah-edition pairs; split those requests.

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": "fetch_tafsir"
  }
}

Input Schema

NameRequiredDescriptionDefault
ayahsNoVerse reference(s): single ('2:255'), range ('2:255-257'), comma/space-separated string like '2:255-260, 3:33', or an array of such strings. Required unless continuation is provided.
editionsNoEdition identifier(s): required. Accept a single string or list; values may be full identifiers ('{lang}-{code}'), short codes ('{code}'), 2-letter language codes ('en', 'ar'), or ≥4 character fuzzy matches across name/author/code/id. Use the explicitly requested source, or choose for this question from the shared tafsir guide or an available catalogue. IDs from the guide can be used directly; use list_editions(edition_type='tafsir') when more selection information is needed. Required unless continuation is provided.
continuationNoOpaque 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_nonceNoAcknowledgment 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.

Output Schema

NameRequiredDescriptionDefault
ayahsYesAyah keys in this page (subset of full request)
resultsYesTafsir results keyed by edition identifier (e.g., '{lang}-{code}')
warningsNoWarnings about data gaps or unresolved edition selectors
paginationYesContinuation metadata
grounding_rulesNoGrounding 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only cover read-only/idempotent safety; the description adds substantially more — a grounding-rule trust prerequisite, a full failure contract ([invalid_request], [not_found], [service_unavailable], continuation error variants), rate-limit/backpressure codes with retry guidance, and a hard size ceiling of 300 ayahs or 1,000 ayah-edition pairs with split guidance. These are operational behaviors an agent cannot infer from annotations or schema.

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

Conciseness3/5

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

The prerequisite/grounding paragraph is correctly front-loaded and the failure contract is compact, but the middle section restates the `editions` schema description almost sentence-for-sentence, and edition-selection guidance appears twice. Roughly a quarter of the text could be cut without losing information.

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?

An output schema exists, so return-value explanation is unnecessary; the description instead fills the remaining gaps — prerequisites, source-selection policy, size limits and splitting, continuation handling, and all documented error codes. For a 4-parameter retrieval tool with an established sibling ecosystem, nothing an agent needs to call it correctly is missing.

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 baseline is 3; the description goes beyond it by supplying selection strategy for `editions` (use explicitly requested verified IDs, otherwise pick from the shared tafsir guide or a catalogue, and consult list_editions only when needed) and by explaining continuation reuse and grounding_nonce reuse semantics. Some of this duplicates the schema text verbatim, which caps it below 5.

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 — 'Retrieve full canonical tafsir text for one or more ayat' — and scopes the trigger to tafsir/explanation/commentary/interpretation requests. It explicitly distinguishes itself from fetch_grounding_rules (prerequisite vs. this tool) and from list_editions ('it is not a prerequisite'), so an agent can route without opening schemas.

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 an explicit when-to-use condition ('when the requested canonical tafsir text for an ayah or ayat is not already in your context via dynamic context or prior tool calls') plus a full prerequisite path with a fallback branch when the grounding-rules skill is unavailable. It also gives negative guidance: don't guess unknown edition IDs, don't auto-reuse a source from a prior question, and don't restrict to the user's language.

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.