Skip to main content
Glama
akave-ai

Akave MCP Server

by akave-ai

get_bucket_location

Retrieve the AWS region or geographic location where an S3-compatible storage bucket is hosted to ensure proper API endpoint configuration and data residency compliance.

Instructions

Get the region/location of a bucket

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucketYesBucket name

Implementation Reference

  • The MCP tool handler function for 'get_bucket_location' that invokes the S3 client's getBucketLocation method and formats the response as MCP content.
    async ({ bucket }) => {
      const location = await this.s3Client.getBucketLocation(bucket);
      return {
        content: [{ type: "text", text: JSON.stringify(location) }],
      };
    }
  • Zod input schema for the 'get_bucket_location' tool, validating the 'bucket' parameter.
    {
      bucket: z.string().describe("Bucket name"),
    },
  • src/server.ts:281-293 (registration)
    Registration of the 'get_bucket_location' MCP tool, including name, description, input schema, and inline handler function.
    this.server.tool(
      "get_bucket_location",
      "Get the region/location of a bucket",
      {
        bucket: z.string().describe("Bucket name"),
      },
      async ({ bucket }) => {
        const location = await this.s3Client.getBucketLocation(bucket);
        return {
          content: [{ type: "text", text: JSON.stringify(location) }],
        };
      }
    );
  • Helper method in S3Client class that sends GetBucketLocationCommand to retrieve the bucket's location/region.
    async getBucketLocation(bucket: string) {
      const command = new GetBucketLocationCommand({
        Bucket: bucket,
      });
      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