delete_object
Remove an object from a specified bucket in Akave's S3-compatible storage by providing the bucket name and object key.
Instructions
Delete an object from a bucket
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bucket | Yes | Bucket name | |
| key | Yes | Object key |
Implementation Reference
- src/server.ts:218-223 (handler)The handler function for the "delete_object" tool. It calls s3Client.deleteObject with the provided bucket and key, then returns a success response.async ({ bucket, key }) => { await this.s3Client.deleteObject(bucket, key); return { content: [{ type: "text", text: JSON.stringify({ success: true }) }], }; }
- src/server.ts:214-217 (schema)Input schema validation using Zod for the bucket and key parameters of the delete_object tool.{ bucket: z.string().describe("Bucket name"), key: z.string().describe("Object key"), },
- src/server.ts:211-224 (registration)Registration of the "delete_object" tool on the MCP server, including name, description, schema, and handler function.this.server.tool( "delete_object", "Delete an object from a bucket", { bucket: z.string().describe("Bucket name"), key: z.string().describe("Object key"), }, async ({ bucket, key }) => { await this.s3Client.deleteObject(bucket, key); return { content: [{ type: "text", text: JSON.stringify({ success: true }) }], }; } );
- src/s3Client.ts:140-146 (helper)Helper method in S3Client class that performs the actual deletion using AWS SDK's DeleteObjectCommand.async deleteObject(bucket: string, key: string) { const command = new DeleteObjectCommand({ Bucket: bucket, Key: key, }); return await this.client.send(command); }