Skip to main content
Glama

Second Wind AI

cross account access denied

iam-access-denied-layer-analysis
Read-onlyIdempotent

Send the denied call and every policy around it: identity policies, resource or trust policy, KMS key policy, permissions boundary, SCP and RCP levels. Evaluates them together the way IAM does, same account or cross account, including the hidden KMS request. Returns the blocking layer and statement, statements that almost matched and why, and the minimal statement to add at each layer. Use when the error reads: AccessDenied | is not authorized to perform: on resource: | with an explicit deny in a policy | because no policy allows the action | User: is not authorized to perform: sts:AssumeRole | KMS.AccessDeniedException. Covers: Evaluates supplied JSON policies for one principal, action and resource. Does not read live accounts and does not evaluate VPC endpoint policies, S3 ACLs, KMS grants or Lake Formation. Price: 10.00 USDC on Base via x402, charged only when the case is solved.

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": {
      "request": "<request>",
      "identity_policies": "<identity_policies>"
    },
    "name": "iam-access-denied-layer-analysis"
  }
}

Input Schema

NameRequiredDescriptionDefault
kmsNoThe KMS key that encrypts the resource. The principal needs these KMS actions as well.
requestYes
rcp_levelsNoOrganization policies, one array per level from the root down to the account. Every level must allow.
scp_levelsNoOrganization policies, one array per level from the root down to the account. Every level must allow.
error_messageNo
session_policyNoAn IAM policy document as JSON.
resource_policyNoBucket policy, queue policy, key policy, secret policy, or the role trust policy for sts:AssumeRole. Omit if the resource has none.
identity_policiesYesEvery managed and inline policy attached to the role or user (and its groups).
permissions_boundaryNoAn IAM policy document as JSON.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the annotations (readOnly, idempotent, closed-world), the description discloses the key behavioral facts: it evaluates only supplied JSON rather than querying live accounts, it accounts for the hidden KMS request in cross-account paths, and it returns near-miss statements plus the minimal statement to add per layer. It also discloses the commercial model (10.00 USDC on Base via x402, charged only when the case is solved), which an agent needs before invoking a paid tool.

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?

It is front-loaded with what it does, then the trigger symptoms, then scope limits, then price — a sensible order for an agent scanning for a match. The error-string list is long but functional rather than padded; the only mild redundancy is restating the evaluation scope in the 'Covers:' sentence.

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?

For a 9-parameter, nested-object tool with no output schema, the description still explains what comes back (blocking layer and statement, near matches with reasons, minimal statement per layer). Combined with disclosed limits and pricing, an agent has everything needed to decide and to call it 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?

With schema coverage at 78% the schema already carries most parameter meaning, but the description adds the mental model the schema cannot: the layers to supply (identity, resource/trust, KMS key, boundary, SCP and RCP) are evaluated jointly, and the KMS request is 'hidden' behind service calls. That framing tells the agent why each policy input matters rather than just its format.

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 states a specific verb and resource: it takes the denied call plus every surrounding policy and evaluates them the way IAM does, then returns the blocking layer and statement. That is a concrete, distinctive purpose an agent can match to an AccessDenied symptom without opening the schema, and it is clearly separate from the CloudFormation/EventBridge siblings.

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?

Usage is pinned to explicit error strings ('AccessDenied', 'is not authorized to perform', 'explicit deny in a <policy type> policy', 'KMS.AccessDeniedException'), giving the agent a direct trigger test. It also states exclusions plainly: it does not read live accounts and does not evaluate VPC endpoint policies, S3 ACLs, KMS grants or Lake Formation, so the agent knows when to look elsewhere.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources