Skip to main content
Glama
Ganjoor MCP Server

Ganjoor MCP Server

Official
by ganjoor

Get Random Ganjoor Poem

ganjoor_get_random_poem
Read-onlyIdempotent

Fetch a random Persian poem from Ganjoor, optionally from a specific poet, to support poetry discovery and inspiration.

Instructions

Get a random poem from Ganjoor, optionally from a specific poet.

Args:

  • poet_id (number): Poet to draw from. 0 = a random poet (default: 0). Hafez = 2.

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

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

Returns: A single complete poem in the same shape as ganjoor_get_poem_by_id.

Examples:

  • "Surprise me with a poem" -> no arguments

  • "A random Saadi poem" -> poet_id=7

Notes:

  • Non-deterministic: repeated calls return different poems.

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_get_random_poem"
  }
}

Input Schema

NameRequiredDescriptionDefault
poet_idNoPoet id to draw from. 0 = any poet. Hafez = 2, Saadi = 7, Rumi = 5.
response_formatNoOutput format: 'markdown' for human-readable text (default) or 'json' for machine-readable structured data.markdown
include_recitationsNoInclude audio recitations.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive, open-world), and the description adds genuinely useful behavior: non-deterministic output across repeated calls and a pointer that the return value matches ganjoor_get_poem_by_id. There is a mild tension with idempotentHint=true, but since the tool has no side effects this is content variance rather than a safety contradiction, and the disclosure is the more helpful of the two signals.

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-loaded purpose sentence, then Args/Returns/Examples/Notes in a scannable order. Some duplication of the input schema in the Args block is wasted text, but the overall length is proportionate to a three-parameter tool.

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 no output schema, the description does the right thing by stating the return shape and cross-referencing ganjoor_get_poem_by_id. It leaves minor gaps, such as whether recitations are attached to the result when include_recitations is true, but nothing essential to 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%, so the Args block largely restates what the schema already documents (defaults, enum, poet mapping) — and the schema's poet_id description is actually richer (Hafez=2, Saadi=7, Rumi=5). The description adds little parameter meaning beyond what structured data already provides, so the baseline of 3 applies.

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 ('Get a random poem from Ganjoor') plus the scoping option ('optionally from a specific poet'), which cleanly separates it from the deterministic siblings like ganjoor_get_poem_by_id or ganjoor_get_poem.

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

Usage Guidelines4/5

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

The examples ('Surprise me with a poem' -> no arguments, 'A random Saadi poem' -> poet_id=7) make the intended use case immediately clear, and the Notes section flags non-determinism. It stops short of explicitly naming when to prefer a deterministic sibling such as ganjoor_get_poem_by_id instead.

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