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
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | ||
| ascending | No | ||
| limit | No | ||
| startsAfter | No |
Implementation Reference
- src/tools/files.ts:51-59 (handler)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 }); }, ); - src/tools/files.ts:17-22 (schema)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(), }); - src/tools/files.ts:24-60 (registration)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 }); }, ); }