Skip to main content
Glama
Ganjoor MCP Server

Ganjoor MCP Server

Official
by ganjoor

Get Related Poem Sections

ganjoor_get_related_sections
Read-onlyIdempotent

Find sections from other poems that match a given poem section by metre and rhyme, enabling stanza-level discovery of reply-poems and cross-poet allusions.

Instructions

Find sections from other poems that match a given poem section in metre and rhyme.

This is the section-level counterpart of ganjoor_find_similar_poems and is how Ganjoor links reply-poems and cross-poet allusions at stanza granularity.

Args:

  • poem_id (number): Numeric poem id

  • section_index (number): 0-based section index within the poem (from ganjoor_get_poem_sections)

  • skip (number): Results to skip (default: 0)

  • items_count (number): How many to return. 0 or negative returns all (default: 10)

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

Returns: For JSON: { poem_id, section_index, total, related_sections: [{ id, poem_id, section_index, poet_name, full_url }] }

Examples:

  • "What matches the first section of poem 2623?" -> poem_id=2623, section_index=0

Notes:

  • items_count=0 returns every match, which can be thousands — prefer a bounded count.

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>",
      "section_index": "<section_index>"
    },
    "name": "ganjoor_get_related_sections"
  }
}

Input Schema

NameRequiredDescriptionDefault
skipNoResults to skip for pagination.
poem_idYesNumeric poem id.
items_countNoHow many related sections to return. 0 or less returns all.
section_indexYes0-based section index within the poem.
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.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the description only needs to add context beyond that. It does so usefully: it discloses the matching semantics (metre and rhyme) and warns that items_count=0 can return thousands of results, which is real operational guidance not present in the structured fields.

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?

The structure is well front-loaded: one-line purpose, then Args, Returns, Examples, Notes, so an agent can stop after the first sentence if it already knows the schema. The Args block duplicates the 100%-covered schema and slightly pads length, but nothing is genuinely wasted.

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

Completeness5/5

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

There is no output schema, and the description compensates by spelling out the JSON return shape (poem_id, section_index, total, related_sections with id, poem_id, section_index, poet_name, full_url). Combined with the pagination caveat and the example, an agent has everything needed to call this correctly for a five-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 description coverage is 100%, so the schema already documents all five parameters, and the Args section largely restates those descriptions verbatim. The only added meaning is the practical caution that an unbounded items_count yields thousands of results and should be bounded, which is a modest increment over the schema default of 10.

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 opening sentence gives a specific verb and resource ("Find sections from other poems that match a given poem section") plus the matching criteria (metre and rhyme). It further distinguishes itself from the sibling ganjoor_find_similar_poems by naming it and stating this is the section-level counterpart, so an agent can pick between them 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 Guidelines4/5

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

The definition gives a clear usage context by positioning itself at stanza granularity versus the poem-level ganjoor_find_similar_poems, and supplies a worked example ("first section of poem 2623"). It stops short of an explicit when-not rule or a stated prerequisite that section_index must come from ganjoor_get_poem_sections as a hard ordering requirement.

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