Skip to main content
Glama

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
NameRequiredDescriptionDefault
filePathYes
categoryYes
accountIdNo

Implementation Reference

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

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