get_relatives
Retrieve family relationships for WikiTree profiles to explore ancestors, descendants, spouses, and siblings using the WikiTree MCP server.
Instructions
Retrieve relatives for a given person ID or list of IDs
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keys | Yes | WikiTree IDs | |
| getParents | No | ||
| getChildren | No | ||
| getSpouses | No | ||
| getSiblings | No | ||
| bioFormat | No | ||
| fields | No |
Implementation Reference
- src/wikitree-server.ts:151-155 (handler)The handler logic for the "get_relatives" tool, which calls `wikitree.getRelatives` with the provided arguments.
case "get_relatives": { const { keys, getParents, getChildren, getSpouses, getSiblings, bioFormat, fields } = args as any; const relatives = await wikitree.getRelatives(keys, { getParents, getChildren, getSpouses, getSiblings, bioFormat, fields }, options); return { content: [{ type: "text", text: JSON.stringify(relatives, null, 2) }] }; } - src/wikitree-server.ts:98-113 (schema)The registration and schema definition for the "get_relatives" tool.
name: "get_relatives", description: "Retrieve relatives for a given person ID or list of IDs", inputSchema: { type: "object", properties: { keys: { type: "array", items: { type: "string" }, description: "WikiTree IDs" }, getParents: { type: "boolean" }, getChildren: { type: "boolean" }, getSpouses: { type: "boolean" }, getSiblings: { type: "boolean" }, bioFormat: { type: "string", enum: ["wiki", "html", "both"] }, fields: { type: "array", items: { type: "string" } }, }, required: ["keys"], }, },