list_buckets
Retrieve all AWS S3 buckets in your account. This tool returns a JSON-formatted list of available storage containers for managing cloud data.
Instructions
Lists all buckets in the AWS account.
Returns: str: JSON formatted list of buckets.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/s3_mcp.py:87-94 (handler)The handler function for the 'list_buckets' tool. It is registered via the @mcp.tool() decorator, calls the core logic helper, and formats the response as JSON.@mcp.tool() def list_buckets() -> str: """Lists all buckets in the AWS account. Returns: str: JSON formatted list of buckets. """ result = _list_buckets_logic()
- src/s3_mcp.py:77-84 (helper)Supporting helper function that executes the core S3 API call to list buckets using the boto3 client.def _list_buckets_logic() -> Dict[str, Any]: """Core logic to list S3 buckets. Returns: Dict[str, Any]: Raw boto3 response from list_buckets. """ client = get_s3_client() return client.list_buckets()