Skip to main content
Glama
Ganjoor MCP Server

Ganjoor MCP Server

Official
by ganjoor

Analyze Poem Rhyme

ganjoor_analyze_poem_rhyme
Read-onlyIdempotent

Detect a Persian poem’s rhyme letter and rhyme pattern from its numeric id, returning structured JSON or readable Markdown for prosody analysis.

Instructions

Detect the rhyme letter (قافیه) and rhyme pattern of a poem by its numeric id.

Args:

  • poem_id (number): Numeric poem id

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

Returns: For JSON: { poem_id, rhyme, rhyme_letter, fail_verse } — rhyme is the full rhyming ending as the prosody engine sees it, and rhyme_letter is its last character.

Examples:

  • "What is the rhyme of poem 2623?" -> poem_id=2623

Notes:

  • Some poems (short texts, composite editions) have no determinable rhyme; those return rhyme=null plus a fail_verse note explaining where analysis stopped.

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": {
      "poem_id": "<poem_id>"
    },
    "name": "ganjoor_analyze_poem_rhyme"
  }
}

Input Schema

NameRequiredDescriptionDefault
poem_idYesNumeric poem id to analyze.
response_formatNoOutput format: 'markdown' for human-readable text (default) or 'json' for machine-readable structured data.markdown

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 declare readOnly/idempotent/non-destructive, so the added value is in the Notes: some poems return rhyme=null with a fail_verse note explaining where analysis stopped, and the Returns block spells out the JSON payload. That is genuine disclosure of a non-obvious failure mode beyond the annotations.

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?

Purpose is front-loaded in the first sentence, then cleanly sectioned into Args/Returns/Examples/Notes. The Args block duplicates schema text, which is the only wasted space.

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 Returns block carries the burden and does so adequately, and the ambiguity edge case is covered. The markdown return shape is left merely as 'human-readable', a minor remaining gap for a tool that offers two formats.

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 coverage is 100%, so both parameters are already documented in the schema; the Args block largely restates them. The description's added meaning (rhyme = full rhyming ending as the prosody engine sees it, rhyme_letter = its last character) describes outputs rather than parameters, so baseline 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?

The description names a specific verb+resource pair ('Detect the rhyme letter and rhyme pattern of a poem') scoped by a numeric id, which is unambiguously distinct from the sibling ganjoor_analyze_poem_rhythm and from the ganjoor_get_poem* retrieval tools.

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 example ('What is the rhyme of poem 2623?' -> poem_id=2623) makes the triggering context concrete, and the Notes explain the fallback case. It never states exclusions or points at an alternative tool for rhythm or verse retrieval, so it falls short of a 5.

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