Skip to main content
Glama
This connector has been deprecated

Tafsir texts for an ayah

shamela_get_tafseer_texts
Read-onlyIdempotent

جلب نصوص تفسير آية

Fetch the actual tafsir texts of one aya across multiple sources in a single call. Strictly index-driven: fetches ONLY pages the curated service/tafseer.db maps to this aya (no text-search fallback — it misattributes verses via shared phrases and the basmala). Pass either aya_id OR surah+aya; optional book_ids restricts sources, max_sources (default 5) caps how many are fetched. Each source carries embedded attribution (book_name, author, death_year, printed_page, page_id) plus continuation: text_part/text_total_parts/text_has_more for long pages and next_page_id for commentary spanning pages — read the per-source note, which names the exact follow-up call, rather than assuming body_part=2. verse_located_in_page says whether the text was cut to START at your verse: when a tafsir quotes the same words several times on one page (a refrain like «فبأي آلاء ربكما تكذبان») and the printed verse numbers do not settle which copy is yours, it returns false with a note and gives you the whole page instead of confidently returning a neighbouring verse's commentary. Requested book_ids absent from the index get an explicit status ('not_indexed' / 'no_entry_for_this_aya') with no text. The overall response respects a character budget; when cut, remaining_book_ids + a _display hint say how to continue. Use shamela_list_tafsirs_for_aya first to see coverage. Examples: shamela_get_tafseer_texts({surah:2, aya:255}), shamela_get_tafseer_texts({surah:2, aya:255, book_ids:[<book_id from shamela_list_tafsirs_for_aya with status 'indexed_covers'>], max_sources:2}).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ayaNoAya within surah.
surahNoSurah number, paired with `aya`.
aya_idNoAya id 1..6236.
book_idsNoRestrict to these tafsir books. Books not present in the curated index for this aya are reported with an explicit status instead of text. Use shamela_list_tafsirs_for_aya to see which books the index covers.
max_sourcesNoMaximum number of sources to fetch text for (1-10, default 5).
response_formatNoOutput format for the human-readable text. 'markdown' (default) is best for direct display; 'json' returns the same data as a single JSON code block; 'none' skips the rendered text entirely and returns a one-line pointer, leaving `structuredContent` as the whole answer. The structured data is returned in `structuredContent` regardless of this setting, so a caller that parses it should pass 'none' — the character budget is measured over BOTH channels, and the unread copy is otherwise spending most of it. Requires the 'response_format.none' capability (see shamela_brief).markdown

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?

Far exceeds the readOnly/idempotent annotations: it explains the strict index-driven behavior, the deliberate absence of a text-search fallback and why (verse misattribution via shared phrases/basmala), explicit statuses for unindexed books, a character budget with continuation hints, and the semantics of verse_located_in_page and the per-source note. This is unusually rich behavioral disclosure.

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 is front-loaded in the opening line and the dense material is largely load-bearing (statuses, continuation, the verse_located_in_page rationale). It is still a very thick paragraph whose parenthetical explanations run long, so it is efficient but not maximally scannable.

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?

With no output schema, the description carries the full return-value burden and does so thoroughly: it enumerates the per-source attribution fields (book_name, author, death_year, printed_page, page_id), continuation fields (text_part/text_total_parts/text_has_more, next_page_id), status strings, and the budget/continuation protocol. An agent has what it needs to call and continue correctly.

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 a genuine cross-parameter constraint the schema cannot express: pass EITHER aya_id OR surah+aya. It also restates max_sources default and explains book_ids status behavior, giving it an edge over pure schema duplication.

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?

States a specific verb and resource — 'Fetch the actual tafsir texts of one aya across multiple sources in a single call' — and adds scope detail (multi-source, index-driven). It routes away from the search tools but never explicitly distinguishes itself from the very close sibling shamela_get_tafseer_of_aya, leaving an ambiguity an agent must resolve on its own.

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?

Gives a concrete workflow ('Use shamela_list_tafsirs_for_aya first to see coverage'), the alternative parameterization (aya_id OR surah+aya), and two worked examples. It clearly frames when the index-driven path is required versus a text search, but does not state when to prefer this over the near-identical sibling shamela_get_tafseer_of_aya.

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.

Resources