Fetch Word Morphology
fetch_word_morphologyFetch word-level morphological analysis for Quranic text. Returns root, lemma, stem, grammatical features, morpheme segments, and frequency data (verbatim occurrence count, root occurrence count, lemma occurrence count) for each word.
For a word or phrase question, fetch morphology only for the words being discussed. Use ayah_key with exact word_text, or word_position verified from morphology or concordance output; never count positions yourself. Fetch all words only for whole-ayah grammar. Batch independent word requests once their inputs are verified, and inspect every result.
Input modes:
ayah_key (e.g., '2:77') → all words in the verse
ayah_key + word_text (e.g., '2:77', 'يَعْلَمُونَ') → specific word by text
ayah_key + word_position (e.g., '2:77', 2) → specific word by position
word (Arabic text, e.g., 'يَعْلَمُونَ') → first occurrence in Quran
Examples:
fetch_word_morphology(ayah_key='2:77', word_text='يَعْلَمُونَ') → morphology of يَعْلَمُونَ
fetch_word_morphology(ayah_key='2:77', word_position=2) → same word by position
fetch_word_morphology(ayah_key='1:1') → all 4 words of Bismillah
fetch_word_morphology(word='يَعْلَمُونَ') → first occurrence + other_occurrences_count
Prefer fetching morphology data over recalling it from memory. Cite this tool in your response when presenting morphological analysis. Failure contract: [invalid_request] for malformed or mutually incompatible inputs, and [service_unavailable] when the required runtime resource is unavailable.
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": "fetch_word_morphology"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| word | No | Arabic word text to look up (e.g., 'يَعْلَمُونَ'). Returns first occurrence. Mutually exclusive with ayah_key. | |
| ayah_key | No | Verse reference (e.g., '2:77'). Returns all words in the verse, or a specific word if word_position is also provided. | |
| word_text | No | Arabic word text to find within the verse (e.g., 'يَعْلَمُونَ'). Matches against exact text or diacritics-insensitive. Requires ayah_key. Mutually exclusive with word_position. | |
| word_position | No | 1-based word position within the verse. Requires ayah_key. Mutually exclusive with word_text. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| words | Yes | Morphological entries per word | |
| ayah_key | Yes | Verse reference (e.g., '2:77') | |
| input_mode | Yes | How input was resolved: 'ayah_key' or 'word_text' | |
| other_occurrences_count | No | For word_text input: total occurrences minus this one |