Skip to main content
Glama
Ganjoor MCP Server

Ganjoor MCP Server

Official
by ganjoor

Get Ganjoor Poem By URL

ganjoor_get_poem
Read-onlyIdempotent

Fetch a complete Persian poem from Ganjoor by URL, returning verses, metre, rhyme, and optional recitations, images, comments, and category context.

Instructions

Fetch a complete poem by its Ganjoor URL, including verses, metre, rhyme, and recitations.

This is the main way to read a poem. The URL is the same as the browser address on ganjoor.net, e.g. "hafez/ghazal/sh494". Use ganjoor_search_poems or ganjoor_list_category_poems to discover URLs, and ganjoor_get_poem_by_id when you only have a numeric id.

Args:

  • url (string): Poem URL slug, with or without leading slash, e.g. 'hafez/ghazal/sh494'

  • include_category (boolean): Include the book/category metadata (default: true)

  • include_siblings (boolean): Include the list of other poems in the same book (default: false)

  • include_recitations (boolean): Include audio recitations (default: true)

  • include_images (boolean): Include manuscript images (default: false)

  • include_comments (boolean): Include published reader comments (default: false)

  • include_verse_details (boolean): Include per-verse ids, positions, and couplet summaries (default: true)

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns: Poem id, title, full title, poet, book/category path, plain text, and the ordered verse list grouped into couplets. For JSON: { id, title, full_title, full_url, poet, category, couplets_count, verses: [{ couplet_index, position, text }], recitations: [...], next_poem, previous_poem }

Examples:

  • "Show me Hafez's ghazal 494" -> url='hafez/ghazal/sh494'

  • "Read this poem with its commentary" -> include_comments=true

Notes:

  • Persian text is returned verbatim; it is right-to-left, so present it as-is.

  • Keep include_siblings and include_comments false unless needed — both can be very large.

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": {
      "url": "<url>"
    },
    "name": "ganjoor_get_poem"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesGanjoor URL slug. Examples: 'hafez/ghazal/sh494', '/hafez/ghazal/sh494', 'mowhaddam/ghazal/ha1'. The leading slash is optional.
include_imagesNoInclude manuscript image links.
response_formatNoOutput format: 'markdown' for human-readable text (default) or 'json' for machine-readable structured data.markdown
include_categoryNoInclude the poem's category/book metadata.
include_commentsNoInclude published reader comments.
include_siblingsNoInclude all other poems in the same book. Can be very large.
include_recitationsNoInclude audio recitations of the poem.
include_verse_detailsNoInclude per-verse ids, positions, and AI summaries.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the safety profile (readOnly, idempotent, openWorld), and the description adds useful behavior beyond that: Persian text is returned verbatim and right-to-left, and the sibling/comment flags can produce very large responses. It does not mention rate limits or failure modes for malformed slugs, but for a read-only fetch the disclosure is solid.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core purpose, then args, returns, examples, and notes in clearly labeled blocks. The Args section largely duplicates the schema, but the Returns block earns its place because no output schema exists. Slightly verbose overall, yet well organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 8 parameters and no output schema, the description compensates by describing the return payload structure in detail, including the JSON shape and couplet grouping. Edge cases like invalid URLs or what happens when a poem lacks recitations are unaddressed, but nothing essential for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% with defaults and an enum already documented, so the schema carries the parameter burden. The description repeats the flags and their defaults and adds example phrasings ('Read this poem with its commentary' -> include_comments=true), but contributes little semantic meaning the schema lacks. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Fetch a complete poem by its Ganjoor URL') and enumerates what is included (verses, metre, rhyme, recitations). It also positions itself against siblings by naming ganjoor_search_poems, ganjoor_list_category_poems, and ganjoor_get_poem_by_id as the discovery/lookup alternatives. An agent can distinguish this from the by-id tool without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly declares itself 'the main way to read a poem', tells the agent to use search/list tools to discover URLs first, and directs numeric-id callers to ganjoor_get_poem_by_id. It also advises keeping include_siblings and include_comments false unless needed, which is a genuine when-not rule.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.