Skip to main content
Glama

s3_generate_policy

Generate least-privilege S3 bucket policies for public-read, private, cross-account, or CloudFront OAI access. Specify bucket name, access type, and optional principals to produce a policy.

Instructions

Generate S3 bucket policies with least-privilege access controls

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyNoAPI key for authentication
principalsNoAWS account IDs or ARNs for cross-account access
access_typeYesAccess pattern type
bucket_nameYesS3 bucket name
Behavior2/5

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

With no annotations provided, the description carries the full burden of disclosing behavior, but it only states the action and goal. It does not reveal what the tool produces (a JSON policy document?), whether it mutates AWS resources or only emits text, whether the api_key parameter implies required authentication, or how access_type shapes the output. The verb 'Generate' hints at non-destructive output, but that is largely a restatement of the name.

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?

One tightly packed sentence with the action and resource front-loaded and zero filler words. It is not under-specified like a pure tautology, but it also lacks the second sentence that could have earned a 5 by routing agents to alternatives.

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 no annotations and no output schema, the description must carry more load than it does. It omits the output format, whether the policy is applied to the bucket or returned to the caller, auth expectations (api_key), and the decision context against S3 siblings like s3_setup_cors. An agent can guess the gist but not the contract.

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 coverage is 100%, so the baseline is 3 and the schema already documents all four parameters. The description's 'least-privilege' qualifier adds mild semantic color to access_type, implying restrictive defaults, but it does not clarify parameter relationships (e.g., that principals is relevant only for cross-account access).

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 pairs a specific verb ('Generate') with a specific resource ('S3 bucket policies') and a meaningful qualifier ('least-privilege access controls'). The explicit 'S3' scoping distinguishes it at a glance from sibling policy generators like cors_generate_policy, cookie_generate_policy, and retention_generate_policy.

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?

The single sentence offers no guidance on when to choose this tool over alternatives such as s3_setup_cors, s3_configure_lifecycle, or the other *_generate_policy siblings. No exclusions, prerequisites, or selection conditions are stated, leaving the agent to infer applicability from the tool name alone.

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/barnburner121/claude-plugin-marketplace'

If you have feedback or need assistance with the MCP directory API, please join our Discord server