Skip to main content
Glama
akave-ai

Akave MCP Server

by akave-ai

copy_object

Copy an object from one S3-compatible storage bucket to another bucket or location within Akave's storage system.

Instructions

Copy an object to another bucket/key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
destinationBucketYesDestination bucket name
destinationKeyYesDestination object key
sourceBucketYesSource bucket name
sourceKeyYesSource object key

Implementation Reference

  • MCP tool handler function for 'copy_object' that calls s3Client.copyObject and returns success response
    async ({
      sourceBucket,
      sourceKey,
      destinationBucket,
      destinationKey,
    }) => {
      await this.s3Client.copyObject(
        sourceBucket,
        sourceKey,
        destinationBucket,
        destinationKey
      );
      return {
        content: [{ type: "text", text: JSON.stringify({ success: true }) }],
      };
    }
  • Input schema using Zod for copy_object tool parameters
    {
      sourceBucket: z.string().describe("Source bucket name"),
      sourceKey: z.string().describe("Source object key"),
      destinationBucket: z.string().describe("Destination bucket name"),
      destinationKey: z.string().describe("Destination object key"),
    },
  • src/server.ts:226-251 (registration)
    Registration of the 'copy_object' MCP tool including name, description, schema, and handler
    this.server.tool(
      "copy_object",
      "Copy an object to another bucket/key",
      {
        sourceBucket: z.string().describe("Source bucket name"),
        sourceKey: z.string().describe("Source object key"),
        destinationBucket: z.string().describe("Destination bucket name"),
        destinationKey: z.string().describe("Destination object key"),
      },
      async ({
        sourceBucket,
        sourceKey,
        destinationBucket,
        destinationKey,
      }) => {
        await this.s3Client.copyObject(
          sourceBucket,
          sourceKey,
          destinationBucket,
          destinationKey
        );
        return {
          content: [{ type: "text", text: JSON.stringify({ success: true }) }],
        };
      }
    );
  • S3Client helper method implementing the copy object logic using AWS SDK CopyObjectCommand
    async copyObject(
      sourceBucket: string,
      sourceKey: string,
      destinationBucket: string,
      destinationKey: string
    ) {
      const command = new CopyObjectCommand({
        Bucket: destinationBucket,
        Key: destinationKey,
        CopySource: `/${sourceBucket}/${sourceKey}`,
      });
      return await this.client.send(command);
    }

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/akave-ai/akave-mcp'

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