list_buckets
Retrieve a complete list of all storage buckets available in your Akave S3-compatible storage account for management and organization purposes.
Instructions
List all buckets in Akave storage
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_buckets"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:43-62 (registration)Registration of the 'list_buckets' MCP tool. Includes inline handler function that calls s3Client.listBuckets() and formats the response as JSON text content.
this.server.tool( "list_buckets", "List all buckets in Akave storage", async () => { const buckets = await this.s3Client.listBuckets(); return { content: [ { type: "text", text: JSON.stringify( buckets.map((bucket) => ({ name: bucket.Name, creationDate: bucket.CreationDate, })) ), }, ], }; } ); - src/server.ts:46-61 (handler)Inline handler function for 'list_buckets' tool: fetches buckets from S3 client and returns formatted list as tool response.
async () => { const buckets = await this.s3Client.listBuckets(); return { content: [ { type: "text", text: JSON.stringify( buckets.map((bucket) => ({ name: bucket.Name, creationDate: bucket.CreationDate, })) ), }, ], }; } - src/s3Client.ts:35-39 (helper)S3 client helper method that executes ListBucketsCommand and returns the buckets array.
async listBuckets() { const command = new ListBucketsCommand({}); const response = await this.client.send(command); return response.Buckets || []; }