Skip to main content
Glama

minio_copy_object

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

Instructions

Copy an object to another location in MinIO

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
source_bucketYesSource bucket name
source_objectYesSource object name
dest_bucketYesDestination bucket name
dest_objectYesDestination object name

Implementation Reference

  • The actual implementation of copy_object method in MinioClient class. Uses MinIO's copy_object API with CopySource to copy objects between buckets/locations.
    def copy_object(
        self,
        source_bucket: str,
        source_object: str,
        dest_bucket: str,
        dest_object: str,
    ) -> dict:
        """Copy an object to another location.
    
        Args:
            source_bucket: Source bucket name
            source_object: Source object name
            dest_bucket: Destination bucket name
            dest_object: Destination object name
    
        Returns:
            Copy result
        """
        from minio.commonconfig import CopySource
    
        result = self._client.copy_object(
            dest_bucket,
            dest_object,
            CopySource(source_bucket, source_object),
        )
    
        return {
            "success": True,
            "source": f"{source_bucket}/{source_object}",
            "destination": f"{dest_bucket}/{dest_object}",
            "etag": result.etag,
            "version_id": result.version_id,
        }
  • Tool registration and input schema definition for minio_copy_object. Defines required parameters: source_bucket, source_object, dest_bucket, dest_object.
    Tool(
        name="minio_copy_object",
        description="Copy an object to another location in MinIO",
        inputSchema={
            "type": "object",
            "properties": {
                "source_bucket": {
                    "type": "string",
                    "description": "Source bucket name",
                },
                "source_object": {
                    "type": "string",
                    "description": "Source object name",
                },
                "dest_bucket": {
                    "type": "string",
                    "description": "Destination bucket name",
                },
                "dest_object": {
                    "type": "string",
                    "description": "Destination object name",
                },
            },
            "required": ["source_bucket", "source_object", "dest_bucket", "dest_object"],
        },
    ),
  • Handler routing in call_tool function that routes minio_copy_object requests to the client.copy_object method.
    elif name == "minio_copy_object":
        result = client.copy_object(
            arguments["source_bucket"],
            arguments["source_object"],
            arguments["dest_bucket"],
            arguments["dest_object"],
        )

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/Raphaelren/minio-mcp'

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