Skip to main content
Glama

iam_policy_detach

Destructive

Detach a managed IAM policy from a user, group, or role to remove its permissions. Requires confirm=true to execute.

Instructions

Detach a managed policy from a user, group or role (principal_type), removing 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_detach"
  }
}

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.7/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is covered. The description still adds value beyond them by stating the concrete effect ('removing its permissions') and the confirm=true prerequisite, which the annotations do not convey. It says nothing about idempotency or what happens when the policy is not attached, keeping it out of the top tier.

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 destructive action front-loaded and the confirm gate last, where the caller will look for it. The parenthetical '(principal_type)' is slightly awkward but ties the enum to a named parameter, so nothing is truly wasted.

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

Completeness4/5

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

For a destructive four-parameter mutation whose annotations cover safety and whose output schema covers return values, the description supplies what is action, what is affected, and what gate must be passed. Only error behavior and required IAM permissions are unaddressed, which are minor omissions at this complexity.

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?

With 0% schema description coverage the description has to carry parameter meaning, and it does so partially: it maps the principal_type enum to user/group/role and explains the role of confirm. principal_name and policy_arn formats (ARN syntax, account scoping) are left entirely undocumented in both schema and description.

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?

States a specific verb ('Detach') plus resource ('managed policy') and enumerates the three principal types it works on, which cleanly separates it from the sibling attach/delete tools. It stops short of naming an alternative explicitly, so a 4 rather than a 5.

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 description supplies one real usage condition — 'needs confirm=true' — which tells the agent a safety gate must be satisfied before invocation. It gives no when-not-to-use guidance and never routes to a sibling such as iam_policy_attach, so usage is implied rather than spelled out.

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