Skip to main content
Glama

YepCode MCP Server

Official
by yepcode
storage-tool-definitions.ts2.46 kB
import { z } from "zod"; import { zodToJsonSchema } from "zod-to-json-schema"; export const storageToolNames = { list: "list_files", upload: "upload_file", download: "download_file", delete: "delete_file", }; export const ListObjectsSchema = z.object({ prefix: z .string() .optional() .describe( "Prefix to filter files by. Filter results to include only files whose names begin with this prefix" ), }); export const UploadObjectSchema = z.object({ filename: z .string() .describe( "Filename or path where to upload the file (e.g., 'file.txt' or 'folder/file.txt')" ), content: z .union([ z.string().describe("File content as plain text (for text files)"), z .object({ data: z.string().describe("File content encoded in base64"), encoding: z.literal("base64").describe("Encoding type"), }) .describe("Base64 encoded file content (for binary files)"), ]) .describe( "File content. Use plain text for text files, or base64 object for binary files" ), }); export const DownloadObjectSchema = z.object({ filename: z .string() .describe( "Filename or path where to download the file (e.g., 'file.txt' or 'folder/file.txt')" ), }); export const DeleteObjectSchema = z.object({ filename: z .string() .describe( "Filename or path where to delete the file (e.g., 'file.txt' or 'folder/file.txt')" ), }); export const storageToolDefinitions = [ { name: storageToolNames.list, title: "List all files in YepCode Storage", description: "List all files that user has previously uploaded to YepCode Storage", inputSchema: zodToJsonSchema(ListObjectsSchema), }, { name: storageToolNames.upload, title: "Upload a file to YepCode Storage", description: "Upload a file to YepCode Storage. Files can be then accessed in your code using the `yepcode.storage` helper methods.", inputSchema: zodToJsonSchema(UploadObjectSchema), }, { name: storageToolNames.download, title: "Download a file from YepCode Storage", description: "Download a file from YepCode Storage.", inputSchema: zodToJsonSchema(DownloadObjectSchema), }, { name: storageToolNames.delete, title: "Delete a file from YepCode Storage", description: "Delete a file from YepCode Storage.", inputSchema: zodToJsonSchema(DeleteObjectSchema), }, ];

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/yepcode/mcp-server-js'

If you have feedback or need assistance with the MCP directory API, please join our Discord server