Skip to main content
Glama

Review IAM Policy

review_iam_policy
Read-onlyIdempotent

Evaluate AWS IAM policy risk from structured facts or raw policy JSON. Identify wildcard scope, privilege-escalation actions, and condition constraints without calling AWS.

Instructions

Evaluate AWS IAM policy risk from structured facts or raw policy JSON, including wildcard scope, privilege-escalation actions and conditions. Use this for AWS IAM operational risk; for provider-specific AWS/Azure/GCP policy-pack checks, use review_cloud_identity_policy. It analyzes supplied policy data only and does not call AWS or modify IAM.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionsNoExplicit allowed IAM actions when raw policy JSON is not supplied.
resourcesNoExplicit IAM resource ARNs or patterns when raw policy JSON is not supplied.
policyJsonNoRaw AWS IAM policy JSON. When supplied, the server derives actions, resources, wildcard scope and privilege-escalation evidence.
policyNameYesName of the AWS IAM policy being assessed.
usedByProductionNoWhether the policy is attached to or used by production identities or workloads.
hasConditionBlocksNoWhether policy statements include Condition constraints that narrow access.
hasWildcardActionsNoWhether the policy permits wildcard actions such as * or service:* patterns.
hasWildcardResourcesNoWhether the policy grants permissions against wildcard resources.
allowsPrivilegeEscalationActionsNoWhether the policy contains actions that can enable privilege escalation.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionsYes
evidenceYes
findingsYes
resourcesYes
riskLevelYes
riskScoreYes
strengthsYes
policyNameYes
uncertaintiesYes
recommendedControlsYes
assessmentConfidenceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.14.0
    • addedInput schema / properties / actions / description
      Added value: +"Explicit allowed IAM actions when raw policy JSON is not supplied."
    • addedInput schema / properties / allowsPrivilegeEscalationActions / description
      Added value: +"Whether the policy contains actions that can enable privilege escalation."
    • addedInput schema / properties / hasConditionBlocks / description
      Added value: +"Whether policy statements include Condition constraints that narrow access."
    • addedInput schema / properties / hasWildcardActions / description
      Added value: +"Whether the policy permits wildcard actions such as * or service:* patterns."
    • addedInput schema / properties / hasWildcardResources / description
      Added value: +"Whether the policy grants permissions against wildcard resources."
    • changedInput schema / properties / policyJson / description
      Previous value: -"Raw IAM policy JSON. The server derives wildcard and privilege-escalation evidence."New value: +"Raw AWS IAM policy JSON. When supplied, the server derives actions, resources, wildcard scope and privilege-escalation evidence."
    • addedInput schema / properties / policyName / description
      Added value: +"Name of the AWS IAM policy being assessed."
    • addedInput schema / properties / resources / description
      Added value: +"Explicit IAM resource ARNs or patterns when raw policy JSON is not supplied."
    • addedInput schema / properties / usedByProduction / description
      Added value: +"Whether the policy is attached to or used by production identities or workloads."
  2. First observedv0.4.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered; the description reinforces it with 'does not call AWS or modify IAM', which is useful confirmation of offline analysis. It adds nothing about output shape or limits, but the output schema covers returns.

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?

Three tight sentences, front-loaded with purpose and risk scope, then routing guidance, then the side-effect boundary. Every sentence carries distinct information with no repetition.

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?

Given rich annotations, a 100%-covered 9-parameter schema, and an existing output schema, the description supplies exactly what is missing: purpose, sibling routing, and the offline/non-mutating boundary. An agent has everything needed to select and invoke 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?

Schema coverage is 100%, so the baseline is 3; the description earns extra by explaining the dual input mode ('structured facts or raw policy JSON') and which risk dimensions each path supports, which helps the agent choose between passing policyJson and the discrete boolean/array fields. It stops short of documenting individual field semantics beyond what the schema already states.

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?

States a specific verb (evaluate/review) and resource (AWS IAM policy), and enumerates what is assessed: wildcard scope, privilege-escalation actions, conditions. It explicitly distinguishes itself from the sibling review_cloud_identity_policy, so an agent can route correctly without opening either schema.

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?

Explicit when-to-use (AWS IAM operational risk) and an explicit alternative with its own condition (provider-specific AWS/Azure/GCP policy-pack checks -> review_cloud_identity_policy). It also sets a boundary on inputs ('analyzes supplied policy data only'), leaving nothing to inference.

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