Skip to main content
Glama

quran.ai

Fetch Quran Text

fetch_quran
Read-onlyIdempotent

Use this tool to retrieve exact canonical Quranic text when the person asks what a passage says or asks for its Arabic, for example, “What does Quran 94:5–6 say?” 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. Defaults to ar-uthmani-hafs if no edition is provided. Invoke whenever a verse reference appears and the requested canonical Quran text for those 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_quran"
  }
}

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): accept a single string or list; values may be full identifiers ('ar-uthmani-hafs'), short codes ('uthmani-hafs'), or 2-letter language codes ('ar'). Defaults to 'ar-uthmani-hafs' when omitted on the initial call.
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)
resultsYesQuran text results keyed by edition identifier (e.g., 'ar-uthmani-hafs')
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.1/5.0
Behavior5/5

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

Annotations already cover read-only, idempotent, non-destructive, closed-world, but the description adds substantial behavior beyond them: a full failure contract with enumerated error codes, rate-limit/busy responses with retry guidance, and hard selection limits (300 ayahs / 1,000 resolved ayah-edition pairs) requiring splitting. The grounding-rules prerequisite and its trust context are also disclosed.

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 purpose and then the prerequisite, followed by invocation rule, defaults, and failure contract in a logical order. It is dense and somewhat repetitive in the grounding branch ('load and read that skill, then pass its acknowledgment... reuse the acknowledgment'), but nearly every sentence carries operational 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?

For a read-only retrieval tool with an output schema (so return values need no explanation) and 100% schema coverage, the description supplies everything an agent needs: trigger condition, prerequisite flow, default edition, pagination via continuation, and the complete error taxonomy including size limits.

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 coverage is 100%, so the schema already documents ayahs, editions, continuation, and grounding_nonce formats. The description mostly restates the default edition ('ar-uthmani-hafs') rather than adding new meaning to specific parameters. Baseline 3 applies when the schema does the heavy lifting.

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?

Specific verb+resource: 'retrieve exact canonical Quranic text', with a concrete example ('What does Quran 94:5–6 say?') and the cue 'asks for its Arabic'. The word 'canonical' implicitly separates it from translation/tafsir siblings, but it never names fetch_translation or fetch_tafsir, so the differentiation is left to inference 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 Guidelines4/5

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

Explicit invocation trigger: use it 'whenever a verse reference appears and the requested canonical Quran text for those ayat is not already in your context via dynamic context or prior tool calls', which is a clear positive and negative condition (skip if already in context). The prerequisite branching for grounding (skill vs. fetch_grounding_rules) further routes the agent. It stops short of naming the alternative tools to use for translation or commentary.

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.