Skip to main content
Glama
Ganjoor MCP Server

Ganjoor MCP Server

Official
by ganjoor

Get Person Relations

ganjoor_get_person_relations
Read-onlyIdempotent

Retrieves a person's kinship and affiliation relations—parents, siblings, spouses, teachers, and contemporaries—with optional relation-type filtering.

Instructions

Get a person's kinship and affiliation edges — parents, siblings, spouses, teachers, and contemporaries.

Args:

  • person_id (number): Numeric person id

  • relation_type (string): Optional filter — only relations of this kind, e.g. 'father', 'son', 'spouse', 'student', 'teacher'

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

Returns: For JSON: { person_id, relation_count, relations: [{ id, from_person_id, from_person_name, to_person_id, to_person_name, relation_kind, relation_name }] }

Examples:

  • "Who was this person's teacher?" -> person_id=, relation_type='teacher'

Notes:

  • Edges are stored undirected with a kind; the same edge appears once.

  • Use ganjoor_get_person_family_tree for the whole connected component.

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": {
      "person_id": "<person_id>"
    },
    "name": "ganjoor_get_person_relations"
  }
}

Input Schema

NameRequiredDescriptionDefault
person_idYesNumeric person id.
relation_typeNoOptional filter on the relation kind, e.g. 'father', 'spouse', 'teacher'.
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.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so the safety profile is covered. The description adds real behavioral context beyond that: edges are stored undirected with a kind and each edge appears once, which prevents duplicate-edge miscounting, and the exact JSON return shape is spelled out. It stops short of stating boundedness or maximum result size, hence a 4 rather than 5.

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 purpose in one strong sentence, then uses tidy Args / Returns / Examples / Notes sections. There is some redundancy in the Args block duplicating the schema, but the rest of the text earns its place and nothing is buried.

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 describing the JSON return fields (person_id, relation_count, relations with relation_kind and relation_name). That is nearly complete for a simple 3-parameter read; the only residual ambiguity is the distinction between relation_kind and relation_name, which is not explained.

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 person_id, relation_type and response_format are already documented in the schema, including example kinds and the default. The description's Args block largely restates those definitions and its relation_type examples ('father', 'son', 'spouse', 'student', 'teacher') overlap with the schema's own examples, so it adds little beyond the baseline.

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 (get) and resource (a person's kinship and affiliation edges) and enumerates the relation classes covered (parents, siblings, spouses, teachers, contemporaries). It is clearly distinguishable from ganjoor_get_person_family_tree, which is named in the notes and scoped to a different breadth.

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?

Includes a concrete example question ('Who was this person's teacher?') mapped to a call shape, plus an explicit routing rule: use ganjoor_get_person_family_tree when the whole connected component is wanted. That gives both when-to-use and a named alternative with its selecting condition.

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