iam-minimize
IAM policy action minimizer: wildcards to the required action list — Takes an AWS IAM policy JSON and the exact list of actions a task needs (up to 300), and returns the policy with each Allow statement's Action narrowed to just those actions, plus what the original over-grants: wildcards, unused actions, Allow+NotAction, required actions no statement grants, and required actions an unconditional Deny blocks. For an agent that is about to attach or propose a policy
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": {
"policy": "<policy>",
"requiredActions": "<requiredActions>"
},
"name": "iam-minimize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| policy | Yes | The IAM policy document as a JSON object or JSON string. At most 60,000 characters. | |
| knownActions | No | Optional catalog of real actions (from the AWS service reference JSON), used to count what each wildcard grants. | |
| requiredActions | Yes | Concrete actions the task needs, e.g. s3:GetObject. No wildcards. |