Skip to main content
Glama
YawLabs

@yawlabs/aws-mcp

Official
by YawLabs

aws_iam_simulate

Read-onlyIdempotent

Simulate IAM permissions to check if a principal can perform actions on resources before execution, preventing 403 errors.

Instructions

Simulate IAM permissions for a principal: can principal X do actions Y on resources Z? Wraps iam simulate-principal-policy. Returns one entry per (action, resource) pair with decision (allowed / explicitDeny / implicitDeny), matchedStatementIds (which IAM statements decided), and missingContextValues (context keys the policy needed but you didn't provide -- common for tag-based policies). Use this BEFORE a risky operation to avoid a 403; pairs with the post-failure Suggestion you get from aws_call. Requires iam:SimulatePrincipalPolicy on the caller.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
principalArnYesARN of the principal whose policies you want to evaluate, e.g. 'arn:aws:iam::123456789012:user/jeff' or 'arn:aws:iam::123:role/my-role'.
actionsYesIAM action names to test, e.g. ['lambda:CreateFunction', 's3:GetObject']. 1-50 entries. Wildcards (e.g. 's3:*') are accepted.
resourcesNoResource ARNs to test against, e.g. ['arn:aws:s3:::my-bucket/*']. Omit to default to ['*'] (best-case 'is this action ever allowed?').
contextEntriesNoContext keys for policies that depend on request context -- 'aws:RequestTag/Project' = 'foo', etc. Provide when the policy you're testing references condition keys; the response's `missingContextValues` will tell you which ones it wanted.
profileNoOverride session profile for this call.
regionNoOverride session region for this call (IAM is global; affects API endpoint).
timeoutMsNoTimeout in milliseconds. Default 60000.
Behavior5/5

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

Annotations already indicate readOnlyHint=true, destructiveHint=false, idempotentHint=true, openWorldHint=true. The description adds significant behavioral context: it returns one entry per (action, resource) pair with decision, matchedStatementIds, and missingContextValues. It also explains the default behavior when resources are omitted. No contradictions with 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 is concise (a few sentences) and well-structured: it starts with core purpose, then details return value, then gives usage guidance. Every sentence adds value; no fluff.

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?

Despite no output schema, the description explains what the tool returns (decision per pair, matchedStatementIds, missingContextValues). It covers purpose, parameters, usage, and return details, making it fully informative for an agent to invoke correctly.

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 100%, so baseline is 3. The description adds value beyond schema by providing examples (e.g., principalArn examples), explaining the effect of omitting resources (defaults to '*'), and clarifying that contextEntries helps resolve missingContextValues. This enriches parameter understanding.

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 clearly states the tool simulates IAM permissions, answering whether a principal can perform actions on resources. It uses a specific verb ('Simulate') and resource ('IAM permissions'), and is distinct from sibling tools like aws_call or aws_resource_get.

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?

The description explicitly recommends using this tool 'BEFORE a risky operation to avoid a 403' and notes it pairs with aws_call for post-failure suggestions. It also mentions the required permission (iam:SimulatePrincipalPolicy). While it does not explicitly list when not to use, the guidance is clear and actionable.

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/YawLabs/aws-mcp'

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