Skip to main content
Glama

Least-privilege IAM deploy policy

iam_policy
Read-onlyIdempotent

Generate a least-privilege IAM policy in JSON for deploying infrastructure-as-code and review it for privilege-escalation risks.

Instructions

Least-privilege IAM policy (JSON) with the actions needed to deploy an infrastructure-as-code input, plus a privilege-escalation review. On Free the Resource is "*"; Roots scopes it to the declared ARNs.

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": {
      "path": "<path>"
    },
    "name": "iam_policy"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesInfrastructure to generate the deploy policy for.
plan_pathNoOptional terraform show -json plan file for real resolved values.
state_pathNoOptional .tfstate overlay for real identifiers (more precise ARNs on Roots).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint and idempotentHint, so the safety profile is covered. The description adds genuinely useful behavior context that annotations cannot: output varies by tier, with Resource set to "*" on Free and scoped to declared ARNs on Roots. It does not say what the privilege-escalation review looks like or when it flags findings, leaving the main differentiator under-explained.

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?

Two sentences, each carrying content, with the primary deliverable front-loaded before the tier caveat. The 'On Free ... Roots' phrasing assumes product vocabulary but is not padding.

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

Completeness3/5

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

For a three-parameter generator with no output schema, the description should explain the shape of the returned JSON policy and the review section, since nothing structured does so. It states what is produced but not how it is organized or what happens with unresolvable resources, so an agent cannot fully anticipate the result.

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%, so all three parameters are already documented in the schema, establishing a baseline of 3. The description adds only oblique meaning (the 'declared ARNs' scoping hints at why state_path yields more precise ARNs) but gives no additional syntax, format, or precedence guidance for combining plan_path and state_path.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific artifact (a JSON least-privilege IAM policy), the input it is derived from (an infrastructure-as-code input), and an extra deliverable (a privilege-escalation review). That is enough for an agent to distinguish it from the cost-oriented siblings, though it never explicitly contrasts with them.

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

Usage Guidelines3/5

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

Usage is only implied: an agent can infer 'call this when you need a deploy policy for IaC'. There is no explicit when-to-use, no when-not, and no mention of when to prefer plan_path/state_path inputs for precision.

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

Deploy Server

Other Tools