Skip to main content
Glama

s3_object_list

List all objects stored in an Amazon S3 bucket to manage and review file contents.

Instructions

List objects in an S3 bucket

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucket_nameYesName of the S3 bucket

Implementation Reference

  • Core execution logic for the s3_object_list tool: calls boto3 S3 client's list_objects_v2 method with the bucket_name argument.
    elif name == "s3_object_list": response = s3_client.list_objects_v2( Bucket=arguments["bucket_name"])
  • Tool definition including input schema that requires a 'bucket_name' string parameter.
    Tool( name="s3_object_list", description="List objects in an S3 bucket", inputSchema={ "type": "object", "properties": { "bucket_name": { "type": "string", "description": "Name of the S3 bucket" } }, "required": ["bucket_name"] } ),
  • Registers the s3_object_list tool (among others) by returning the list of AWS tools via MCP's list_tools handler.
    @server.list_tools() async def list_tools() -> list[Tool]: """List available AWS tools""" logger.debug("Handling list_tools request") return get_aws_tools()
  • Shared post-execution logic: logs the operation to audit and returns the S3 API response as formatted JSON text content.
    aws.log_operation("s3", name.replace("s3_", ""), arguments) return [TextContent(type="text", text=f"Operation Result:\n{json.dumps(response, indent=2, default=custom_json_serializer)}")]
  • Combines S3 and DynamoDB tools (including s3_object_list from get_s3_tools) into the full tools list returned by list_tools.
    def get_aws_tools() -> list[Tool]: return [ *get_s3_tools(), *get_dynamodb_tools() ]

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/rishikavikondala/mcp-server-aws'

If you have feedback or need assistance with the MCP directory API, please join our Discord server