Skip to main content
Glama

copy_object

Copy objects between buckets in MinIO storage. Specify source and destination buckets with object names to duplicate files.

Instructions

复制对象

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceBucketYes源存储桶名称
sourceObjectYes源对象名称
destBucketYes目标存储桶名称
destObjectYes目标对象名称

Implementation Reference

  • The primary handler function that executes the object copy operation using the MinIO client's copyObject method.
    async copyObject(sourceBucket: string, sourceObject: string, destBucket: string, destObject: string): Promise<void> { this.ensureConnected(); const copyConditions = new Minio.CopyConditions(); await this.client!.copyObject(destBucket, destObject, `/${sourceBucket}/${sourceObject}`, copyConditions); }
  • Tool dispatcher in the CallToolRequest handler that validates input with Zod and calls the MinIO client handler.
    case 'copy_object': { const { sourceBucket, sourceObject, destBucket, destObject } = z.object({ sourceBucket: z.string(), sourceObject: z.string(), destBucket: z.string(), destObject: z.string() }).parse(args); await this.minioClient.copyObject(sourceBucket, sourceObject, destBucket, destObject); return { content: [ { type: 'text', text: `成功复制对象从 ${sourceBucket}/${sourceObject} 到 ${destBucket}/${destObject}` } ] }; }
  • src/index.ts:186-199 (registration)
    Registration of the copy_object tool in the ListToolsRequestSchema response, defining name, description, and input schema.
    { name: 'copy_object', description: '复制对象', inputSchema: { type: 'object', properties: { sourceBucket: { type: 'string', description: '源存储桶名称' }, sourceObject: { type: 'string', description: '源对象名称' }, destBucket: { type: 'string', description: '目标存储桶名称' }, destObject: { type: 'string', description: '目标对象名称' } }, required: ['sourceBucket', 'sourceObject', 'destBucket', 'destObject'] } },
  • Zod input validation schema used in the copy_object tool handler.
    const { sourceBucket, sourceObject, destBucket, destObject } = z.object({ sourceBucket: z.string(), sourceObject: z.string(), destBucket: z.string(), destObject: z.string() }).parse(args);

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/pickstar-2002/minio-storage-mcp'

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