Skip to main content
Glama
logic-arts-official

scaleway-ops-mcp-server

Set Scaleway Bucket Policy

scaleway_s3_put_bucket_policy
DestructiveIdempotent

Replace an entire Scaleway S3 bucket policy with a JSON document. Use to set or overwrite access rules; first get the existing policy to merge new statements without losing current grants.

Instructions

Replace a bucket's entire Bucket Policy with the given JSON document. This is the bucket-scoped half of access control - see scaleway_iam_create_policy's description for why both an IAM Policy and a Bucket Policy are needed together. Recommended safety net: include a statement granting the bucket owner's own user_id full access (mirrors the console's 'Maintain access to bucket' checkbox) so a mistake here can never lock the account out of its own bucket.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucketYesBucket name, e.g. 'payments-backups'.
regionNoRegion the bucket lives in. Defaults to the server's configured region (fr-par).
policy_jsonYesThe COMPLETE bucket policy document as a JSON string (not a JS object) - this call REPLACES the entire existing policy, it does not merge. To add a statement without losing existing grants, call scaleway_s3_get_bucket_policy first, add your statement to its Statement array, then PUT the merged document. Known gotcha: 's3:HeadObject' is NOT a valid action here (HeadObject/HeadBucket calls are authorized via 's3:GetObject'/'s3:ListBucket' respectively) - submitting it fails with 'Policy has invalid action'. Despite the AWS-compatible API/SDK, 'Resource' entries are BARE bucket names, NOT ARNs - use 'my-bucket' and 'my-bucket/*', not 'arn:aws:s3:::my-bucket' (submitting an ARN fails with 'Policy has invalid resource', confirmed empirically 2026-08-18). To grant an application_id Principal, 'Version' must be '2023-04-17' (not AWS's '2012-10-17') - example: {"Version":"2023-04-17","Statement":[{"Sid":"Example","Effect":"Allow","Principal":{"SCW":"application_id:<uuid>"},"Action":["s3:GetObject","s3:ListBucket"],"Resource":["my-bucket","my-bucket/*"]}]}. Also remember an IAM Policy (scaleway_iam_create_policy) granting the SAME principal project-wide access to the relevant permission sets is required in addition to this bucket policy - a Bucket Policy alone is not sufficient on Scaleway.
Behavior5/5

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

Annotations already mark this as destructive (destructiveHint: true) and idempotent (idempotentHint: true). The description reinforces this by stating it 'Replaces' and 'does not merge,' and goes well beyond by warning about the specific gotcha that using ARNs instead of bare names fails, the Version=2023-04-17 requirement for application_id principals, and that s3:HeadObject is invalid. These behavioral nuances (error-prone values, companion IAM policy need) provide critical transparency beyond structured annotations.

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 field is three sentences: first sentence states the action, second sentence links to the IAM companion for broader context, third sentence provides a concrete safety recommendation. Every sentence serves a distinct purpose with no redundancy. The heavy parameter documentation is correctly placed in the schema, keeping the description lean and front-loaded.

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

Completeness4/5

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

For a PUT operation with no output schema, the description covers the core action, safety net, and companion tool need. The schema handles detailed syntax rules and gotchas. The combination is complete enough for correct invocation. A minor gap: the description doesn't mention that the tool returns no meaningful body (only success/error), but this is implicit for a PUT. Slightly more explicit return information would earn a 5.

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%, and the input schema already contains an extremely detailed description for policy_json (including gotchas, format, merging workflow, known invalid actions/resources, version requirement). The main Description field adds only the safety net tip about granting the owner access. While helpful, this adds minimal parameter semantics beyond the schema. Baseline 3 is appropriate.

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 'Replace a bucket's entire Bucket Policy with the given JSON document,' which is a specific verb ('Replace') and resource ('bucket's entire Bucket Policy'). It explicitly distinguishes from sibling IAM policy tools by calling this the 'bucket-scoped half of access control' and referencing scaleway_iam_create_policy. Among siblings like scaleway_s3_get_bucket_policy or scaleway_s3_delete_bucket_policy, this tool's purpose is unmistakable and differentiated.

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

Usage Guidelines5/5

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

The description provides clear when-to-use context: setting a full bucket policy. It explicitly contrasts with the get-merge-put workflow by stating 'To add a statement without losing existing grants, call scaleway_s3_get_bucket_policy first...' and redirects to scaleway_iam_create_policy for the IAM companion requirement. The safety net recommendation ('include a statement granting the bucket owner's own user_id full access') gives proactive guidance to prevent lockout. This is comprehensive alternatives and exclusion advice.

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/logic-arts-official/scaleway-ops-mcp-server'

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