Skip to main content
Glama
timeweb-s3-mcp-ai-cli

timeweb-s3-mcp-ai-cli

s3_prefix_usage

Sum bytes and object counts per first-level sub-prefix in an S3 bucket to identify which folders consume space; read-only results are estimates when scans are partial.

Instructions

Sum bytes and object counts per first-level sub-prefix under prefix, scanning up to max_scan keys (default 10000); read-only. Use it to see which folders take space; use s3_largest_objects for individual files. Returns prefixes[] (prefix, bytes, count; objects directly under prefix are grouped under prefix itself), scanned, partial, continuation_token and next_result_offset when more than 1000 rows exist. partial:true means totals cover only the scanned keys; this is an estimate, not billing data.

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": "<bucket>"
    },
    "name": "s3_prefix_usage"
  }
}

Input Schema

NameRequiredDescriptionDefault
bucketYesBucket name, e.g. "backups". Must be inside the configured bucket scope.
prefixNoParent prefix whose first-level sub-prefixes are summed, e.g. "backups/"; omit for the bucket root.
max_scanNoMaximum number of object keys to scan in this call; default 10000. Higher values give more complete results but take longer.
result_offsetNoRow offset into the aggregated prefixes: pass next_result_offset from the previous response with the same prefix, max_scan and continuation_token; default 0.
continuation_tokenNocontinuation_token from a previous partial result to scan the next batch of keys; omit to start at the beginning of prefix.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.1.1
    • addedInput schema / properties / bucket / description
      Added value: +"Bucket name, e.g. \"backups\". Must be inside the configured bucket scope."
    • addedInput schema / properties / continuation_token / description
      Added value: +"continuation_token from a previous partial result to scan the next batch of keys; omit to start at the beginning of prefix."
    • addedInput schema / properties / max_scan / description
      Added value: +"Maximum number of object keys to scan in this call; default 10000. Higher values give more complete results but take longer."
    • addedInput schema / properties / prefix / description
      Added value: +"Parent prefix whose first-level sub-prefixes are summed, e.g. \"backups/\"; omit for the bucket root."
    • addedInput schema / properties / result_offset / description
      Added value: +"Row offset into the aggregated prefixes: pass next_result_offset from the previous response with the same prefix, max_scan and continuation_token; default 0."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it declares read-only, discloses the max_scan truncation behavior, explains that partial:true means totals are only over scanned keys, and warns this is an estimate rather than billing data. It also describes pagination state (scanned, continuation_token, next_result_offset) beyond what the schema states.

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?

Front-loaded with purpose and sibling routing, then the return shape, then the caveat — a sensible order. It is a single dense paragraph with semicolon-chained clauses, which is efficient but slightly harder to scan than a structured list would be.

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?

There is no output schema, so describing the returned prefixes[] entries (prefix, bytes, count), the grouping of objects directly under the parent prefix, and the pagination fields is exactly the missing information an agent needs. Combined with the partial/estimate warning, nothing material about invocation or interpretation is left unstated.

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 coverage is already 100%, so the baseline is 3; the description adds value by explaining how result_offset pairs with continuation_token and the same prefix/max_scan to paginate rows, and by tying max_scan to result completeness. It does not, however, add anything about bucket scope handling or edge cases at the root prefix beyond the schema.

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?

Opens with a specific verb and resource: 'Sum bytes and object counts per first-level sub-prefix under prefix', and immediately contrasts with the sibling s3_largest_objects for individual files. An agent can distinguish this aggregation tool from listing tools like s3_list_objects without opening any schema.

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?

Gives a clear use case ('see which folders take space') and names the explicit alternative (s3_largest_objects) for per-file analysis. It does not state when-not to use it (e.g., when a full accounting is required rather than the max_scan-bounded estimate), but the partial/estimate caveat covers that implicitly.

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