List Ganjoor Books
ganjoor_list_booksList Ganjoor book collections alphabetically with optional name and poet filters, returning category IDs for browsing poems.
Instructions
List Ganjoor books (named collections such as دیوان حافظ or غزلیات سعدی), alphabetically.
Every returned entry is a category of type "Book". Use the resulting category id with ganjoor_get_category to browse the poems inside, or with ganjoor_get_category_poems to list them.
Args:
name (string): Optional filter — only books whose name contains this substring (case-insensitive)
poet_id (number): Optional filter — only books belonging to this poet id
page (number): Page number, starting from 1 (default: 1)
page_size (number): Items per page, 1-100 (default: 20)
response_format ('markdown' | 'json'): Output format (default: 'markdown')
Returns: For JSON: { count, page, page_size, has_more, next_page, books: [{ id, name, poet_id, poet_name, full_url }] }
Examples:
"What books does Hafez have?" -> poet_id=2
"Find books matching 'ghazal'" -> name='ghazal'
"Show me Molavi's collections" -> poet_id=5
Notes:
Filtering happens server-side, so it is much cheaper than fetching everything and filtering locally.
Ganjoor's book catalog is a curated subset: some major poets (including Hafez) have no entries. For them use ganjoor_get_poet with include_cats=true, which lists a poet's sections directly.
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": "ganjoor_list_books"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Case-insensitive substring filter on the book name, e.g. 'ghazal' or 'divan'. | |
| page | No | Page number, starting from 1. | |
| poet_id | No | Only books belonging to this poet id. 0 disables the filter. | |
| page_size | No | Maximum items to return per page (1-100, default 20). | |
| response_format | No | Output format: 'markdown' for human-readable text (default) or 'json' for machine-readable structured data. | markdown |