s3_put_object
Upload content to an S3 bucket by specifying bucket name, object key, and content data for storage management.
Instructions
Upload an object to an S3 bucket
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bucket | Yes | The name of the bucket | |
| key | Yes | The key (path) of the object | |
| content | Yes | The content to upload |
Implementation Reference
- src/index.ts:219-239 (handler)Handler for the s3_put_object tool. Extracts bucket, key, and content from arguments, creates a PutObjectCommand, sends it to the S3 client, and returns a success message.case "s3_put_object": { const { bucket, key, content } = request.params.arguments as { bucket: string; key: string; content: string; }; const command = new PutObjectCommand({ Bucket: bucket, Key: key, Body: content, }); await s3Client.send(command); return { content: [ { type: "text", text: `Successfully uploaded to ${bucket}/${key}`, }, ], }; }
- src/index.ts:111-132 (schema)Tool specification including name, description, and input schema for s3_put_object in the ListTools response.{ name: "s3_put_object", description: "Upload an object to an S3 bucket", inputSchema: { type: "object", properties: { bucket: { type: "string", description: "The name of the bucket", }, key: { type: "string", description: "The key (path) of the object", }, content: { type: "string", description: "The content to upload", }, }, required: ["bucket", "key", "content"], }, },