persons.delete
Remove a person from Ryft accounts by specifying account and person IDs to manage financial resources and maintain accurate customer data.
Instructions
Delete a Ryft person.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| accountId | Yes | ||
| personId | Yes |
Implementation Reference
- src/tools/persons.ts:90-98 (handler)The handler logic for 'persons.delete' which calls the Ryft HTTP client's delete method.
registerTool( 'persons.delete', 'Delete a Ryft person.', getPersonSchema.shape, async (args) => { const { accountId, personId } = getPersonSchema.parse(args); return client.delete(`/accounts/${accountId}/persons/${personId}`); }, ); - src/tools/persons.ts:41-44 (schema)The Zod schema used for input validation of 'persons.delete' (shared with 'persons.get').
const getPersonSchema = z.object({ accountId: z.string().min(1), personId: z.string().min(1), }); - src/tools/persons.ts:46-99 (registration)The registration function for all person-related tools.
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}`); }, ); }