Search Ganjoor Poems
ganjoor_search_poemsSearch Persian poem text across Ganjoor to find verses by wording when you do not know the title. Filter results by poet or category and optionally include full poem text.
Instructions
Full-text search across all poems on Ganjoor, optionally scoped to one poet or category.
The search matches Persian text inside poem bodies and titles. Use this when you know what the poem says but not what it is called; use ganjoor_list_category_poems when you know the book.
Args:
term (string): Search text. Persian phrases work best; matches are substring based.
poet_id (number): Restrict to one poet (default: 0 = all poets)
cat_id (number): Restrict to one category (default: 0 = all categories)
page (number): Page number, starting from 1 (default: 1)
page_size (number): Results per page, 1-100 (default: 20)
include_text (boolean): Include each poem's full text in the response (default: false)
response_format ('markdown' | 'json'): Output format (default: 'markdown')
Returns: For JSON: { count, page, page_size, has_more, next_page, poems: [{ id, title, full_title, full_url, plain_text? }] }
Examples:
"Find poems mentioning 'دل'" -> term='دل', poet_id=2
"Search Hafez for 'صبر'" -> term='صبر', poet_id=2
"Give me the full text of the matches" -> include_text=true
Notes:
Narrow with
poet_idorcat_idfirst: unfiltered search over all poems is broad and slow to page through.Set
include_text=trueonly for a small page; full poems are long.
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": {
"term": "<term>"
},
"name": "ganjoor_search_poems"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number, starting from 1. | |
| term | Yes | Persian text to search for, e.g. 'صبر', 'دل', 'معرفت'. | |
| cat_id | No | Restrict to a category id. 0 searches all categories. | |
| poet_id | No | Restrict to a poet id. 0 searches all poets. | |
| page_size | No | Maximum items to return per page (1-100, default 20). | |
| include_text | No | Include the full poem text for each result. | |
| response_format | No | Output format: 'markdown' for human-readable text (default) or 'json' for machine-readable structured data. | markdown |