Skip to main content
Glama

iam_policy_attach

Destructive

Attach a managed IAM policy to a user, group, or role to grant its permissions; set confirm=true to authorize the change.

Instructions

Attach a managed policy to a user, group or role (principal_type), granting its permissions; needs confirm=true.

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": {
      "principal_type": "<principal_type>",
      "principal_name": "<principal_name>",
      "policy_arn": "<policy_arn>"
    },
    "name": "iam_policy_attach"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmNo
policy_arnYes
principal_nameYes
principal_typeYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already flag this as a destructive, open-world write. The description adds real value beyond them by requiring confirm=true and stating the effect (permissions are granted). It does not mention that the grant is reversible via detach, nor any permission prerequisites, which matters for a destructive IAM mutation.

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?

A single compact sentence with the verb-resource pair front-loaded and the confirm requirement trailing. No filler, though the confirm caveat could be tightened.

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?

An output schema exists, so return values need not be described. For a destructive four-parameter mutation, though, the definition omits permission prerequisites, idempotency behavior on repeat attach, and the detach counterpart, leaving it only minimally sufficient.

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 coverage is 0%, so the description has to compensate. It explains principal_type's three modes and the confirm=true gate, but principal_name and policy_arn are only loosely implied and no formats (ARN structure, principal name resolution) are given.

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 verb and resource ('attach a managed policy') and enumerates the valid principals (user, group or role), which implicitly separates it from inline-policy and detach siblings. It stops short of explicitly contrasting with iam_inline_policy_put or iam_policy_detach.

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?

The intent ('granting its permissions') gives implied context for when to use it, and the confirm=true requirement is stated. There is no explicit when-not guidance or named alternative such as detach or inline policy put.

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