Get Ganjoor Category
ganjoor_get_categoryFetch a Ganjoor category by numeric ID to see its breadcrumb, child sections, and contained poems, enabling exploration of a poet’s books or sections.
Instructions
Get a Ganjoor category (a book, section, or sub-collection) by numeric id.
A category is the container for poems inside a poet's work — for example Hafez's ghazals (category id 10) or Rumi's Masnavi. The response includes the breadcrumb path, the direct children (sub-sections), and optionally the poems it contains.
Args:
cat_id (number): Category id. Hafez's root category is 9.
include_poems (boolean): Include the poems inside this category (default: true)
include_children (boolean): Include the direct child categories/sections (default: true)
poem_limit (number): Maximum poems to return when include_poems is true, 1-200 (default: 50)
response_format ('markdown' | 'json'): Output format (default: 'markdown')
Returns: Category metadata: id, title, breadcrumb, description, table-of-contents style, child categories, and (optionally) contained poems with their ids, titles and URLs. Set include_poems=false to skip the poem list; use ganjoor_list_category_poems when you only want the poems and their total count.
Examples:
"What is inside Hafez's ghazals?" -> cat_id=10, include_children=false
"List Hafez's sections" -> cat_id=9, include_poems=false
Notes:
A category that directly contains poems returns those poems; a pure section returns children instead. Follow
childrento descend.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"cat_id": "<cat_id>"
},
"name": "ganjoor_get_category"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cat_id | Yes | Category id. Hafez's root category is 9; use ganjoor_list_books or ganjoor_get_poet to discover others. | |
| poem_limit | No | Maximum poems to include when include_poems is true. | |
| include_poems | No | Include the poems contained directly in this category. | |
| response_format | No | Output format: 'markdown' for human-readable text (default) or 'json' for machine-readable structured data. | markdown |
| include_children | No | Include the direct child categories. |