Skip to main content
Glama
Amazon S3 MCP Server

Amazon S3 MCP Server

by aggeentik

Delete S3 Object

s3_delete_object
DestructiveIdempotent

Delete unwanted or obsolete objects from Amazon S3 buckets, clean up temporary uploads, and remove specific versions from versioned buckets.

Instructions

Delete an object from an S3 bucket.

⚠️ WARNING: This is a DESTRUCTIVE operation. Deleted objects cannot be recovered unless versioning is enabled on the bucket.

Use this tool to:

  • Remove unwanted or obsolete files

  • Clean up temporary uploads

  • Delete specific versions in versioned buckets

Args: bucket_name: S3 bucket name key: Object key to delete (e.g., 'temp/old-file.txt') version_id: Specific version to delete (for versioned buckets only) response_format: Output format - 'markdown' (default) or 'json'

Returns: Deletion confirmation with version information if applicable. For versioned buckets, indicates if a delete marker was created.

Behavior: - Non-versioned buckets: Object is permanently deleted - Versioned buckets: Delete marker created (object can be recovered) - With version_id: Specific version permanently deleted

Security Notes: - Requires s3:DeleteObject IAM permission - For versioned buckets, may need s3:DeleteObjectVersion - Consider enabling MFA Delete for added protection - Operation cannot be undone for non-versioned buckets

Error Handling: - Bucket/object not found: Returns error (idempotent - safe to retry) - Access denied: Returns error with IAM permission guidance - Invalid parameters: Returns validation error with corrections

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "bucket_name": "<bucket_name>",
      "key": "<key>"
    },
    "name": "s3_delete_object"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYes
version_idNo
bucket_nameYes
response_formatNomarkdown

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

The annotations already declare destructiveHint=true and idempotentHint=true. Beyond that, the description explains what versioning does to the outcome (permanent delete versus delete marker), ties version_id to permanent version removal, states the required IAM permissions (s3:DeleteObject and s3:DeleteObjectVersion), and notes that not-found errors are safe to retry. That is substantial extra context the annotations cannot convey.

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

Conciseness4/5

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

The destructive warning is front-loaded and sits above the Args and Returns sections, so an agent sees the key risk before reading the parameter details. There is mild repetition, since the warning about unrecoverable deletes appears in the header, the Behavior section, and the Security Notes, but every section still earns its place.

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

Completeness5/5

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

The description, the annotations, the output schema, and the parameter list together cover safety, preconditions, parameter meanings, and error handling. Nothing an agent needs in order to call this destructive tool correctly is missing.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must carry the load; it documents all four parameters, including a key-format example ('temp/old-file.txt'), the constraint that version_id applies only to versioned buckets, and the meaning of response_format. It still omits details such as bucket naming rules or version_id format, so it is not fully exhaustive.

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

Purpose5/5

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

The description opens with a specific verb and resource: 'Delete an object from an S3 bucket.' That verb alone separates it from the get, put, and list siblings, and the 'Use this tool to' bullets add concrete delete scenarios that reinforce the scope.

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

Usage Guidelines4/5

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

It gives clear context by listing three concrete situations where the tool applies (removing obsolete files, cleaning up temp uploads, deleting specific versions), and it scopes version_id to versioned buckets only. It stops short of explicit when-not guidance or naming the get, put, and list siblings as alternatives, so the score is 4 rather than 5.

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