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()
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral context. It states it reads content but doesn't disclose authentication requirements, rate limits, error handling, return format, or whether it streams or loads entire objects into memory. For a read operation with zero annotation coverage, this is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's front-loaded with the core action and resource, making it immediately scannable and appropriately sized for a simple tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'content' means (e.g., binary data, text), how large objects are handled, or what the return value looks like. For a read operation with no structured safety or output information, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with both parameters clearly documented in the schema. The description doesn't add any additional meaning beyond what's in the schema (e.g., format examples, constraints), so it meets the baseline of 3 where the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Read') and resource ('object's content from S3'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like s3_object_list or s3_object_delete, but the verb 'Read' versus 'list' or 'delete' provides implicit distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, error conditions, or comparison to sibling tools like s3_object_list (for metadata) or s3_object_upload (for writing).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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