Skip to main content
Glama

files.list

Retrieve and organize files from the Ryft MCP server by category, sorting order, and quantity limits to manage financial resources effectively.

Instructions

List files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNo
ascendingNo
limitNo
startsAfterNo

Implementation Reference

  • The handler implementation for the 'files.list' MCP tool.
    registerTool(
      'files.list',
      'List files.',
      listFilesSchema.shape,
      async (args) => {
        const query = listFilesSchema.parse(args) as Record<string, QueryValue>;
        return client.get('/files', { query });
      },
    );
  • Schema definition for the inputs accepted by 'files.list'.
    const listFilesSchema = z.object({
      category: z.string().optional(),
      ascending: z.boolean().optional(),
      limit: z.number().int().positive().max(100).optional(),
      startsAfter: z.string().optional(),
    });
  • Registration function that includes 'files.list'.
    export function registerFileTools(registerTool: ToolRegistrar, client: RyftHttpClient) {
      registerTool(
        'files.create',
        'Upload a file to Ryft.',
        createFileSchema.shape,
        async (args) => {
          const { filePath, category, accountId } = createFileSchema.parse(args);
          const request = {
            path: '/files',
            filePath,
            category,
            ...(accountId ? { accountId } : {}),
          };
          return client.uploadFile(request);
        },
      );
    
      registerTool(
        'files.get',
        'Get a file by id.',
        getFileSchema.shape,
        async (args) => {
          const { id, accountId } = getFileSchema.parse(args);
          return client.get(`/files/${id}`, accountId ? { accountId } : undefined);
        },
      );
    
      registerTool(
        'files.list',
        'List files.',
        listFilesSchema.shape,
        async (args) => {
          const query = listFilesSchema.parse(args) as Record<string, QueryValue>;
          return client.get('/files', { query });
        },
      );
    }

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