Skip to main content
Glama
Ganjoor MCP Server

Ganjoor MCP Server

Official
by ganjoor

Get Poem Sections

ganjoor_get_poem_sections
Read-onlyIdempotent

Retrieve a poem’s structural sections—stanzas, couplets, and tercets—by poem ID to analyze each form’s metre, rhyme, and section type.

Instructions

Get the structural sections of a poem — the stanzas (بند), couplets (مثنوی), and tercets (رباعی) it is built from.

Ganjoor models a poem as nested sections so that poetry written in distinct forms within one poem (e.g. a ghazal that closes with a qet'e) can be analysed per-section.

Args:

  • poem_id (number): Numeric poem id

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

Returns: For JSON: { poem_id, section_count, sections: [{ id, index, number, section_type, verse_type, metre, rhyme }] }

Examples:

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

Notes:

  • Section index values feed directly into ganjoor_get_related_sections.

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

Input Schema

NameRequiredDescriptionDefault
poem_idYesNumeric poem id.
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

A3.8/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 safety profile is covered; the description adds real value beyond that by explaining the nested-section model and why it exists (mixed forms within one poem) and by documenting the JSON return shape. It omits what the markdown rendering looks like, a minor gap.

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

Conciseness5/5

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

Front-loaded one-line definition, then clearly separated Args/Returns/Examples/Notes blocks; every section carries distinct information and there is no padding beyond the unavoidable restatement of the two schema params.

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 compensates by giving the exact JSON object shape (poem_id, section_count, sections with field names) and by noting the downstream use of `index`. The markdown output form is left unspecified, which is the only material gap for a two-parameter read tool.

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 the schema already documents poem_id and the response_format enum/default, and the description largely restates both. The example mapping a natural-language question to poem_id=2623 adds modest practical meaning but no new syntax or constraint beyond the schema.

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

Purpose4/5

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

States a specific verb and resource ('Get the structural sections of a poem') and explains the domain concept of nested sections with concrete forms (stanza/couplet/tercet). It does not explicitly contrast itself with nearby siblings like ganjoor_get_poem_verses or ganjoor_get_couplet_sections, so the agent must infer the boundary.

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

Usage Guidelines3/5

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

Usage is implied by the example ('What is the structure of poem 2623?') and by the note that section `index` values feed into ganjoor_get_related_sections, which is a useful handoff. There is no explicit when-to-use vs when-to-use-an-alternative statement (e.g. vs ganjoor_get_couplet_sections), leaving selection guidance to inference.

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