persons.list
Retrieve a list of persons associated with a specific Ryft account to manage financial resources and compliance data.
Instructions
List Ryft persons for an account.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| accountId | Yes | ||
| ascending | No | ||
| limit | No | ||
| startsAfter | No |
Implementation Reference
- src/tools/persons.ts:58-67 (handler)The handler for the persons.list tool, which performs a GET request to list persons for a given account.
registerTool( 'persons.list', 'List Ryft persons for an account.', listPersonsSchema.shape, async (args) => { const parsed = listPersonsSchema.parse(args); const { accountId, ...query } = parsed; return client.get(`/accounts/${accountId}/persons`, { query: query as Record<string, QueryValue> }); }, ); - src/tools/persons.ts:34-39 (schema)Input validation schema for the persons.list tool.
const listPersonsSchema = z.object({ accountId: z.string().min(1), ascending: z.boolean().optional(), limit: z.number().int().positive().max(100).optional(), startsAfter: z.string().optional(), }); - src/tools/persons.ts:46-99 (registration)Function responsible for registering all person-related tools, including persons.list.
export function registerPersonTools(registerTool: ToolRegistrar, client: RyftHttpClient) { registerTool( 'persons.create', 'Create a Ryft person for a business account.', createPersonSchema.shape, async (args) => { const parsed = createPersonSchema.parse(args); const { accountId, ...body } = parsed; return client.post(`/accounts/${accountId}/persons`, body); }, ); registerTool( 'persons.list', 'List Ryft persons for an account.', listPersonsSchema.shape, async (args) => { const parsed = listPersonsSchema.parse(args); const { accountId, ...query } = parsed; return client.get(`/accounts/${accountId}/persons`, { query: query as Record<string, QueryValue> }); }, ); registerTool( 'persons.get', 'Get a Ryft person by id.', getPersonSchema.shape, async (args) => { const { accountId, personId } = getPersonSchema.parse(args); return client.get(`/accounts/${accountId}/persons/${personId}`); }, ); registerTool( 'persons.update', 'Update a Ryft person.', updatePersonSchema.shape, async (args) => { const parsed = updatePersonSchema.parse(args); const { accountId, personId, ...body } = parsed; return client.patch(`/accounts/${accountId}/persons/${personId}`, body); }, ); registerTool( 'persons.delete', 'Delete a Ryft person.', getPersonSchema.shape, async (args) => { const { accountId, personId } = getPersonSchema.parse(args); return client.delete(`/accounts/${accountId}/persons/${personId}`); }, ); }