Skip to main content
Glama

Get Person Tree

get_person_tree
Read-only

Retrieve a person's ancestors or descendants up to 10 generations deep, including generation, kinship labels, name, ID, and birth/death with places.

Instructions

List a person's ancestors or descendants up to 10 generations deep: one row per relative with the generation, an optional kinship label (Father's mother, Granddaughter), name, Gramps ID, birth and death with places, and handle. Ancestors follow the person's parent families; descendants follow the children of families where the person is a parent, so relatives not linked that way are missing. For how two given people are related use get_relations; for dated events around one person use get_timeline; for one full record use get_object.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
personYesThe person to start from. Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects.
directionYesancestors (parents, grandparents, …) or descendants (children, grandchildren, …).
generationsNoHow many generations to walk, 1–10 (default 3); other values are clamped.
kinshipLabelsNoWhen true (default), add kinship text such as Father's mother or Granddaughter. When false, show only generation numbers.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.3.0
    • changedInput schema / properties / direction / description
      Previous value: -"Tree direction: ancestors | descendants."New value: +"ancestors (parents, grandparents, …) or descendants (children, grandchildren, …)."
    • changedInput schema / properties / generations / description
      Previous value: -"Number of generations to include (default: 3, max: 10)"New value: +"How many generations to walk, 1–10 (default 3); other values are clamped."
    • changedInput schema / properties / person / description
      Previous value: -"Root person handle or Gramps ID. Handle or Gramps ID (e.g. I0001). Handles are opaque strings from the API. Gramps IDs (like I0001, F0023) are auto-resolved to handles. Find handles with search() or list_objects()."New value: +"The person to start from. Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects."
  2. First observedv2.2.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already establish the read-only, non-destructive profile, and the description adds real substance: the row-by-row return shape, the traversal semantics (ancestors via parent families, descendants via children of families where the person is a parent), and the caveat that relatives not linked that way are omitted. It does not cover performance or pagination behavior, which keeps it short of a 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?

The return shape and traversal semantics are front-loaded, and the routing sentence at the end is dense but purposeful. Slightly long, but every clause carries information an agent needs.

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, so the description's enumeration of returned fields (generation, kinship label, name, Gramps ID, birth/death with places, handle) substitutes for it well. Combined with the coverage caveat and sibling routing, nothing essential is missing for correct invocation.

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 all four parameters are already documented with defaults and clamping behavior. The description only echoes the 10-generation cap and kinship-label concept, so it adds little beyond the schema; baseline 3 is appropriate.

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 (List) plus resource (a person's ancestors or descendants) and scope (up to 10 generations). It explicitly distinguishes itself from get_relations, get_timeline, and get_object, so an agent can route between siblings without opening schemas.

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?

Names three alternatives with the condition that selects each: get_relations for how two people are related, get_timeline for dated events around one person, get_object for one full record. It also flags a when-not case implicitly by stating which relatives are missing from the traversal.

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