Skip to main content
Glama

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
NameRequiredDescriptionDefault
accountIdYes
personIdYes

Implementation Reference

  • 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}`);
      },
    );
  • 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),
    });
  • 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}`);
        },
      );
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bkawk/ryft-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server