iam_delete_access_group
Delete an access group by specifying its ID, removing associated policies and members.
Instructions
Delete an access group
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| access_group_id | Yes | ID of the access group to delete |
Implementation Reference
- src/tools/iam/index.ts:188-200 (handler)The handler function that executes the iam_delete_access_group tool logic. It deletes an access group by its ID via a DELETE request to the IAM Access Groups API.
// ─── iam_delete_access_group ────────────────────────────────── server.tool( "iam_delete_access_group", "Delete an access group", { access_group_id: z.string().describe("ID of the access group to delete"), }, async ({ access_group_id }) => safeTool(async () => { assertWriteAllowed(config.allowWrite); await client.delete(`${IBM_ENDPOINTS.IAM_ACCESS_GROUPS}/groups/${access_group_id}`); return { message: `Access group ${access_group_id} deleted successfully` }; }) ); - src/tools/iam/index.ts:192-193 (schema)Input schema for the tool: requires a single string parameter 'access_group_id' which is the ID of the access group to delete.
{ access_group_id: z.string().describe("ID of the access group to delete"), - src/tools/iam/index.ts:189-200 (registration)Registration of 'iam_delete_access_group' as a tool on the MCP server instance, within the registerIAMTools function.
server.tool( "iam_delete_access_group", "Delete an access group", { access_group_id: z.string().describe("ID of the access group to delete"), }, async ({ access_group_id }) => safeTool(async () => { assertWriteAllowed(config.allowWrite); await client.delete(`${IBM_ENDPOINTS.IAM_ACCESS_GROUPS}/groups/${access_group_id}`); return { message: `Access group ${access_group_id} deleted successfully` }; }) ); - src/server.ts:50-50 (registration)The registerIAMTools function is called here during server initialization, which registers the iam_delete_access_group tool.
registerIAMTools(server, client, config); - src/config.ts:29-29 (helper)Definition of the IAM_ACCESS_GROUPS endpoint URL used by the tool to make the DELETE request.
IAM_ACCESS_GROUPS: "https://iam.cloud.ibm.com/v2",