Skip to main content
Glama

s3_object_read

Retrieve content from Amazon S3 storage by specifying bucket name and object key to access stored files or data.

Instructions

Read an object's content from S3

Input Schema

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

Implementation Reference

  • The core handler logic for the 's3_object_read' tool: retrieves the S3 object using boto3 get_object, reads and decodes its body to UTF-8 text, and returns it 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 input schema and metadata for the 's3_object_read' tool using MCP Tool object.
    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 the 's3_object_read' tool (among others) with the MCP server by providing it in the list_tools() response via get_aws_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