Skip to main content
Glama

copy_object

Copy objects between buckets in MinIO Storage by specifying source and destination bucket and object names through the MCP server.

Instructions

复制对象

Input Schema

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

Implementation Reference

  • Handler for the 'copy_object' tool that validates input with Zod, calls MinIOStorageClient.copyObject, and returns a success message.
    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}` } ] }; }
  • Input schema and tool metadata for 'copy_object' tool defined in the list_tools response.
    { 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'] } },
  • The MinIOStorageClient method that implements the object copy operation using the MinIO client library.
    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); }

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