Skip to main content
Glama

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
NameRequiredDescriptionDefault
accountIdYes
ascendingNo
limitNo
startsAfterNo

Implementation Reference

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

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