Skip to main content
Glama

quran.ai

Search Quran

search_quran
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. Semantic search over Quran text. Returns ranked ayat matching the query with Arabic text and optional translations. Use the translations parameter ('auto' or specific editions) to include translated text in results, which covers most use cases that search_translation would handle. For exact verse lookup by reference (e.g., '2:255'), use fetch_quran 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_quran"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryNoSemantic search query. Can be in any language. Examples: 'patience in adversity', 'الصبر', 'verses about mercy'. Required unless continuation is provided.
surahNoOptional surah number to restrict search to a specific chapter. If omitted, searches all surahs.
intentNoOptional 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.
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.
translationsNoTranslation control: - None (default): No translations, only Arabic text - 'auto': Auto-detect query language, return single best-matching translation - 'en-abdel-haleem' (or another concrete selector): Return that specific translation - ['en-sahih-international', ...]: Return all specified edition translations - 'en' (2-letter code): Return single best translation from that language
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
queryYesThe search query that was executed
resultsYesRanked search results
warningsNoWarnings about unresolved editions or translation gaps
paginationYesCompact current-page continuation metadata
total_foundYesTotal results represented by this paginated response set
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.4/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the description's job is to add context, which it does via a detailed failure contract distinguishing invalid_request, continuation_invalid/conflict/exhausted, search_backend_failure, and search_enrichment_failure. It also explains that intent is telemetry-only and never affects retrieval. Beyond that it says nothing about result volume, ranking behavior, or pagination limits, so it is solid but not rich relative to a tool with an output schema.

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

Conciseness4/5

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

Front-loaded with the prerequisite block, then purpose, then alternatives, then the failure contract — a sensible ordering. However, the prerequisite paragraph is verbose (roughly a hundred words of nested conditionals) and the translations sentence partly restates the schema, so it is not maximally tight.

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 six-parameter semantic search tool with an output schema and full annotations, the description covers everything an agent needs: the mandatory grounding prerequisite and its fallback, semantic scope, sibling routing for exact lookups and translations, and a per-error-code failure contract. Nothing material 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, but the description adds genuine meaning beyond the schema for grounding_nonce: when to reuse the packaged skill's acknowledgment ('reuse the acknowledgment once you have read the skill') versus when to call fetch_grounding_rules, and that it suppresses repeated rules without replacing them. It also frames translations as the preferred path over search_translation, which the schema does not convey, though intent and continuation semantics are largely left to the schema.

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 ('Semantic search over Quran text'), describes the return shape ('ranked ayat matching the query with Arabic text and optional translations'), and explicitly draws the boundary against siblings: exact reference lookup goes to fetch_quran, and translation retrieval is largely subsumed from search_translation. An agent can identify this tool without opening the schema.

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 explicit when-to-use and when-not guidance: use this for semantic search, use fetch_quran for exact verse references, and prefer the translations parameter over search_translation for most translation needs. It also prescribes the prerequisite grounding workflow with a named fallback (fetch_grounding_rules) and conditions for reusing a skill acknowledgment.

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.