Tafsir texts for an ayah
shamela_get_tafseer_textsجلب نصوص تفسير آية
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
| Name | Required | Description | Default |
|---|---|---|---|
| aya | No | Aya within surah. | |
| surah | No | Surah number, paired with `aya`. | |
| aya_id | No | Aya id 1..6236. | |
| book_ids | No | Restrict 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_sources | No | Maximum number of sources to fetch text for (1-10, default 5). | |
| response_format | No | Output 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 |