get_ancestors
Retrieve ancestor information from WikiTree by specifying a person ID and generation depth to explore family lineage and relationships.
Instructions
Retrieve ancestors for a given person ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | WikiTree ID | |
| depth | No | Number of generations to retrieve | |
| bioFormat | No | ||
| fields | No | ||
| resolveRedirect | No |
Implementation Reference
- src/wikitree-server.ts:141-145 (handler)The handler for the "get_ancestors" tool, which extracts arguments from the request and calls the wikitree library's getAncestors function.
case "get_ancestors": { const { key, depth, bioFormat, fields, resolveRedirect } = args as any; const ancestors = await wikitree.getAncestors(key, { depth, bioFormat, fields, resolveRedirect }, options); return { content: [{ type: "text", text: JSON.stringify(ancestors, null, 2) }] }; } - src/wikitree-server.ts:68-81 (registration)Registration and input schema definition for the "get_ancestors" tool.
name: "get_ancestors", description: "Retrieve ancestors for a given person ID", inputSchema: { type: "object", properties: { key: { type: "string", description: "WikiTree ID" }, depth: { type: "number", description: "Number of generations to retrieve" }, bioFormat: { type: "string", enum: ["wiki", "html", "both"] }, fields: { type: "array", items: { type: "string" } }, resolveRedirect: { type: "boolean" }, }, required: ["key"], }, },