Skip to main content
Glama
akave-ai

Akave MCP Server

by akave-ai

update_object

Overwrite existing objects in S3-compatible storage buckets by specifying bucket name, object key, and new content to update stored data.

Instructions

Update (overwrite) an object in a bucket

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesNew object content
bucketYesBucket name
keyYesObject key

Implementation Reference

  • The handler function for the 'update_object' MCP tool. It calls the S3Client's updateObject method with the provided bucket, key, and body, then returns a success response.
    async ({ bucket, key, body }) => {
      await this.s3Client.updateObject(bucket, key, body);
      return {
        content: [{ type: "text", text: JSON.stringify({ success: true }) }],
      };
    }
  • Input schema validation for the 'update_object' tool using Zod, defining bucket, key, and body parameters.
    {
      bucket: z.string().describe("Bucket name"),
      key: z.string().describe("Object key"),
      body: z.string().describe("New object content"),
    },
  • src/server.ts:180-194 (registration)
    Registration of the 'update_object' tool on the MCP server, including name, description, input schema, and handler.
    this.server.tool(
      "update_object",
      "Update (overwrite) an object in a bucket",
      {
        bucket: z.string().describe("Bucket name"),
        key: z.string().describe("Object key"),
        body: z.string().describe("New object content"),
      },
      async ({ bucket, key, body }) => {
        await this.s3Client.updateObject(bucket, key, body);
        return {
          content: [{ type: "text", text: JSON.stringify({ success: true }) }],
        };
      }
    );
  • Supporting helper method in S3Client class that implements object update by delegating to putObject (which overwrites existing objects).
    async updateObject(bucket: string, key: string, body: string) {
      // S3 putObject overwrites by default
      return this.putObject(bucket, key, body);
    }

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