Skip to main content
Glama

quran.ai

Read Interactive Study Context

interactive_study_context_read
Read-onlyIdempotent

Recover a missing reader reference; this is not an attachment listing. It returns where the user is in the reader now: the active ayah, any selected passage and the visible page, as the open reader last reported them. A reader has an active ayah from the moment it opens, before the user taps anything, and the recitation moves it. If a requested reader passage is still unidentified from the prompt and submitted items, and current reader context is unavailable for that reader, call interactive_study_context_read exactly once. Use its latest saved context only to fill that missing reference, without replacing other submitted items. Current context that says no selection is still available context; do not replace it with older saved state or restore a removed passage. If the reference remains unidentified, say the reader selection is unavailable instead of inferring or guessing what the user meant. Pass the relevant reader's context ID whenever this conversation contains it, from the reader's opening result or its current reader context; omit it only when no context ID appears in the conversation.

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_context_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
context_idNoPublic context ID of the relevant reader, as this conversation shows it: in the reader's opening result or in its current reader context. Pass it whenever the conversation contains it. Without it, only a host that identifies the conversation, such as ChatGPT, can find the latest saved context; on other hosts, such as Claude, a reader's saved context is found only by its context ID.

Output Schema

NameRequiredDescriptionDefault
sourceYesopen_reader_report when the reader that is open reported this state, which it does within a second of the user moving, selecting or the recitation advancing; server_saved_reader_context when no reader is open and its last saved context is returned; none otherwise.
revisionNoServer-assigned monotonic revision of the saved context. Null when unavailable, and for an open reader that has not saved one yet.
saved_atYesUTC time of the returned state: when the open reader last reported a change, or when the saved context was written. Null when unavailable.
context_idYesPublic locator used for this result. An opaque 24-character lowercase hexadecimal value permits sanitized explicit lookup on every host but never mutation. Null when the caller omitted context_id and no trusted scoped context resolved.
active_ayahNoThe ayah the user is on in the reader: the ayah holding the reader's cursor. A reader has one from the moment it opens, before anything is tapped; a tap, a step, a link or the recitation moves it. With no selection, this is what 'this ayah' or 'where I am' means. It is not the viewport anchor, which only records what is at the top of the view. Null when the reader has reported no position.
availabilityYesWhether the reader's state is available: what its open reader last reported, or else its last saved context.
visible_pageNoThe field reports the latest visible Mushaf page independently of the selection. Null means the lookup has no visible page.
reader_lineageYesSanitized reader tool, public context generation, and initial/successor relation. It never contains an instance ID or capability.
viewport_anchorYesLatest canonically validated stable viewport word anchor and offset, with the shared reader cursor when one was saved; the cursor's ayah and word are validated against canonical pages too. Null when unavailable or not yet reported.
active_selectionYesThe result reports the selection after validation against canonical Quran text. Null means the reader has no selection. The active_ayah field still identifies the ayah that holds the cursor. The viewport anchor does not establish a selection.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, but the description adds substantive behavior the annotations cannot express: the data is the *last saved* reader snapshot, a current 'no selection' result is still valid context, and stale saved state must not resurrect a removed passage. It also discloses host-dependent lookup behavior tied to the context ID, which is meaningful operating context beyond the safety hints.

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?

Purpose and the call-once rule are front-loaded and most sentences carry a distinct rule (call trigger, fill-only semantics, no-selection handling, fallback wording). It runs long and the final sentence re-covers parameter guidance already in the schema, which is the main redundancy, but no sentence is pure filler.

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 shape needn't be spelled out, yet the description still characterizes the returned state precisely enough to interpret it. With one optional parameter, a documented host caveat, and explicit failure semantics, an agent has everything needed to call this correctly.

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 description coverage is 100% and the sole parameter's schema text already explains when to supply context_id and what happens on hosts without conversation identity. The description's parallel guidance ('pass it whenever the conversation contains it… omit it only when no context ID appears') largely restates that, so baseline 3 is appropriate—useful reinforcement, little new meaning.

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?

The description opens with a specific verb and resource—'Recover a missing reader reference'—and immediately delimits scope ('this is not an attachment listing'), then enumerates the exact returned state: active ayah, selected passage, visible page. That is enough for an agent to distinguish this recovery tool from listing-style siblings without opening a 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?

It gives a precise trigger condition (requested passage still unidentified and current reader context unavailable), an explicit call budget ('exactly once'), and negative rules (do not replace other submitted items, do not restore a removed passage, do not overwrite a current 'no selection' state with older saved state). It closes with a prescribed fallback—say the selection is unavailable rather than guessing—so when-to-use and when-not-to-guess are both covered.

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.