Skip to main content
Glama

s3_object_read

Retrieve and read the content of an object stored in an S3 bucket by specifying the bucket name and object key using the AWS MCP Server.

Instructions

Read an object's content from S3

Input Schema

NameRequiredDescriptionDefault
bucket_nameYesName of the S3 bucket
object_keyYesKey/path of the object to read

Input Schema (JSON Schema)

{ "properties": { "bucket_name": { "description": "Name of the S3 bucket", "type": "string" }, "object_key": { "description": "Key/path of the object to read", "type": "string" } }, "required": [ "bucket_name", "object_key" ], "type": "object" }

Implementation Reference

  • Executes the s3_object_read tool by fetching the S3 object using boto3 client and returning its decoded content as TextContent.
    elif name == "s3_object_read": logging.info(f"Reading object: {arguments['object_key']}") response = s3_client.get_object( Bucket=arguments["bucket_name"], Key=arguments["object_key"] ) content = response['Body'].read().decode('utf-8') return [TextContent(type="text", text=content)]
  • Defines the Tool object for s3_object_read, including name, description, and input schema requiring bucket_name and object_key.
    Tool( name="s3_object_read", description="Read an object's content from S3", inputSchema={ "type": "object", "properties": { "bucket_name": { "type": "string", "description": "Name of the S3 bucket" }, "object_key": { "type": "string", "description": "Key/path of the object to read" } }, "required": ["bucket_name", "object_key"] } ),
  • Registers all AWS tools, including s3_object_read, by returning get_aws_tools() in response to list_tools calls.
    @server.list_tools() async def list_tools() -> list[Tool]: """List available AWS tools""" logger.debug("Handling list_tools request") return get_aws_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