files.create
Upload files to Ryft for evidence, verification documents, or reports using a secure API interface.
Instructions
Upload a file to Ryft.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | ||
| category | Yes | ||
| accountId | No |
Implementation Reference
- src/tools/files.ts:29-38 (handler)The handler function for the 'files.create' tool. It validates the input using 'createFileSchema' and calls 'client.uploadFile'.
async (args) => { const { filePath, category, accountId } = createFileSchema.parse(args); const request = { path: '/files', filePath, category, ...(accountId ? { accountId } : {}), }; return client.uploadFile(request); }, - src/tools/files.ts:6-10 (schema)Zod schema defining the input validation for 'files.create'.
const createFileSchema = z.object({ filePath: z.string().min(1), category: z.enum(['Evidence', 'VerificationDocument', 'Report']), accountId: z.string().optional(), }); - src/tools/files.ts:25-39 (registration)Tool registration for 'files.create'.
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); }, );