Survey a topic across the library
shamela_reconاستكشاف: حجم الموضوع في المكتبة وأين يقع
Round-zero reconnaissance: how much does this library actually hold on a topic, and on which shelves, BEFORE a retrieval plan is committed to. Same measurement as shamela_root_stats but mode defaults to 'literal' — counting pages that carry the WORD as written rather than every AlKhalil root reading of it. That difference is the point: «الاستصناع» reports 393,498 pages across 7,405 books morphologically and 1,510 literally, and the first answer says every shelf holds the topic, which is not a plan. Returns the EXACT page total plus the distribution by category, Hijri century, book and author, in 6-9 ms. Read the distribution as corpus size PLUS topic, never as authority: التفسير tops nearly every profile because tafsir is simply the largest body of text here, not because it is where the question is answered. Use the by_category ranking to choose scope.category_ids for the searches that follow. Examples: shamela_recon({root:'الاستصناع'}), shamela_recon({root:'التيمم', scope:{citable_only:true}}).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'literal' counts pages carrying the WORD as written (plus the ordinary spelling folds). 'morphological' expands it to every AlKhalil root reading and counts those — which is far broader than most callers expect: «الاستصناع» reports 393,498 pages across 7,405 books morphologically against 1,510 literally, an answer that says every shelf holds the topic. Use 'literal' to size a topic before planning retrieval; use 'morphological' to trace a ROOT through its derivations. | literal |
| root | Yes | Arabic root or base word to profile (e.g. «صبر»، «رحم»، «علم»). Under mode='morphological' it is matched via the AlKhalil analyzer, so all derived forms (صابر، يصبر، اصطبار…) are counted, not just the literal string. | |
| scope | No | Restrict the profile to specific books, authors, categories, or a Hijri date range. Use shamela_list_categories / shamela_resolve to find IDs. Omit to profile the whole downloaded library. | |
| 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 |