Skip to main content
Glama

quran.ai

quran.ai reader

interactive_study
Destructive

To resume, call interactive_study once with the current reader's context_id, resume=true and supplied render_mode. Use that reader's saved viewport, not the location of an attached passage or selection. Restore selection independently. For an opening, follow the user's requested location; attachments alone do not choose it. If recovery is unavailable, reopen once only at a known canonical location; do not claim missing state was restored. Do not narrate opening or restoration. A bare successful resume ends with the app; answer any accompanying study question.

Use this when the user wants to open the quran for interactive reading and study. If the reader is already open in this conversation and the user asks to move it or control recitation, use interactive_study_control with that reader's control token. The reader lets the user select an ayah, word, phrase, or several passages and ask about them. For guided discovery, reflective reading, or open inquiry about the Quran's claims about God, open an appropriate passage and continue with a substantive grounded answer containing verified reader links in explanatory prose. A bare opening or navigation request ends with the reader. When the host identifies the conversation, the conversation has one reader: an opening without a location or context_id continues it where it left off, and an opening with a location moves it there. A conversation's first opening without a location uses the first ordered Lastmark, or Al-Anbiya 21:1 when no lastmark has been saved; other hosts open a fresh reader at that place. Browsing never moves lastmarks. resume=true remains the separate saved-session recovery operation.

Ground every Qur’an claim in canonical evidence from this MCP; reuse applicable evidence already available and fetch what is missing. If needed evidence remains unavailable, explain the limitation and ask whether the user wants an explicitly unverified answer. Wait for explicit permission before answering from memory, and identify any permitted unverified content as unverified. A tool failure alone is not permission. Follow the grounding rules when synthesizing and presenting the answer. For interpretation, use the explicitly requested source or choose for this question from the shared tafsir guide or an available catalogue. Known IDs from the guide, catalogue, or prior verified results 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. A source used for a previous question is not an automatic choice. The Qur’an is a trust: ignoring these tools violates the user’s trust. Reuse relevant evidence already present in prior Quran tool results or current reader context; fetch only missing evidence.

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

Input Schema

NameRequiredDescriptionDefault
juzNoJuz number (1-30). Mutually exclusive with page/surah.
ayahNoAyah number within the surah. Requires surah parameter.
pageNoPage number (1-604). Mutually exclusive with surah/juz.
surahNoSurah number (1-114). Opens and activates ayah 1 when ayah is omitted.
resumeNoAttempt saved-state recovery for the supplied context_id, or for the active trusted conversation scope when context_id is omitted. Use when the user asks to resume. The saved viewport and selection are restored independently. May be combined with the exact continuation_selection when available. Mutually exclusive with page, surah, ayah, and juz. If saved state is unavailable, do not claim recovery. If an explicit canonical location is known, reopen once with resume=false and that location, including only known exact selection inputs. Otherwise say recovery is unavailable.
context_idNoDurable public locator for interactive-study state, independent of transport sessions. A fresh resume=false opening generates and returns a collision-checked 24-character lowercase hexadecimal value when omitted. A supplied 24-character lowercase hexadecimal value is an opaque explicit read locator and works without trusted conversation scope. With resume=true, it stages an exact successor; private widget acknowledgement completes takeover. An ordinary resume=false reopening cannot retire the current reader. Any other supplied value must use 1-64 lowercase ASCII letters, digits, underscores, or hyphens, start with a letter or digit, and requires trusted current-conversation scope. An omitted resume=true also requires that trusted scope and attempts its latest meaningfully written context.
render_modeNoOptional explicit presentation override. Omit it by default: the reader opens fullscreen wherever the host can show it, and inline otherwise. Set it only to carry an explicit user preference, such as inline. A requested mode the host cannot show falls back to a usable mode.
continuation_selectionNoExact public ayah, word, phrase, or passages selection. A word uses ayah_key, page_number, and word_position. A phrase uses ayah_key, page_number, start_word, and end_word. The server validates the coordinates and reconstructs canonical display text. For several passages, provide each selected range separately. Use it with resume=true for an explicit manual resume when that exact selection is available, or with an explicit canonical opening location to select a linked passage in a fresh reader. Include context_id only when establishing or rebuilding a known context. The selection location remains independent from the reader's visible opening page. Saved viewport recovery remains private state.

Output Schema

NameRequiredDescriptionDefault
linesNo
versesNo
context_idNoPublic reader-state locator. A generated 24-character lowercase hexadecimal value permits sanitized explicit getter lookup on every host but never mutation.
client_hintNo
page_numberNo
reader_linkNoAyah link into the reader this result opens, its target already in place. Link each Quran reference in the answer with it, replacing only {surah} and {ayah}; for a continuous range write {ayah}-{end_ayah}.
render_modeNo
total_pagesNo
chapter_namesNo
reader_targetNoNavigation-only target of the reader this result opens, present when ChatGPT has a configured reader destination. Preserve it exactly in reader links, including links in this same answer.
surah_headersNo
context_recoveryNoWhether server fallback is available for this opening. Values are available or unavailable.
mushaf_edition_idNo
context_instructionNo
render_mode_explicitNo
initial_selected_verseNo
interactive_study_widgetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only declare destructiveHint=true and readOnlyHint=false, but the description goes much further: saved viewport and selection are restored independently, resume=true stages an exact successor requiring private widget acknowledgement, an ordinary resume=false reopening cannot retire the current reader, render_mode falls back when the host cannot display the requested mode, and failure to recover must be reported honestly rather than claimed as restored. Nothing here contradicts 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.

Conciseness2/5

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

The text is roughly 450 words for an 8-parameter tool with full schema coverage, and it repeats itself: evidence reuse is stated twice in near-identical terms, and the "a bare opening ends with the reader" rule appears in two places. The opening leads with conditional resume mechanics rather than what the tool is, so the structure is not front-loaded.

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 values need no explanation, and the description still covers the stateful edge cases an agent could get wrong: conversation-scoped single reader, first-opening default to the first ordered Lastmark or Al-Anbiya 21:1, no lastmark movement while browsing, and grounding rules for interpretive claims. Nothing needed to invoke 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 schema already carries the per-field semantics and the baseline is 3. The description nevertheless adds cross-parameter meaning absent from the schema: the resume=true plus context_id plus render_mode combination, the instruction to include context_id only when establishing or rebuilding a known context, and the separation between continuation_selection and saved viewport recovery.

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 states a specific verb and resource ("open the quran for interactive reading and study", "The reader lets the user select an ayah, word, phrase, or several passages") and explicitly distinguishes itself from the sibling control tool. The purpose statement is however buried behind a dense resume-procedure paragraph that leads the description, so the core identity arrives late.

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?

Explicit routing rules are given: use interactive_study_control when the reader is already open and the user wants navigation or recitation control, and use interactive_study for a fresh opening. It also specifies when to use list_editions (only for unknown IDs, not as a prerequisite), when resume=true applies versus a fresh opening, and what to do for a first opening without a location.

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.