Skip to main content
Glama

list_iam_users

Retrieve all IAM users from your AWS account to manage access permissions and audit user accounts.

Instructions

Lists IAM users in the AWS account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_iam_users' tool. It sends a ListUsersCommand to the IAM client, maps the response to extract UserName, UserId, Arn, and CreateDate, and returns the JSON stringified list.
    if (name === "list_iam_users") { const command = new ListUsersCommand({}); const response = await iamClient.send(command); const users = response.Users?.map(u => ({ UserName: u.UserName, UserId: u.UserId, Arn: u.Arn, CreateDate: u.CreateDate })) || []; return { content: [ { type: "text", text: JSON.stringify(users, null, 2) } ] } }
  • src/index.ts:132-138 (registration)
    Registration of the 'list_iam_users' tool in the ListToolsRequestHandler, including its name, description, and empty input schema (no parameters required).
    name: "list_iam_users", description: "Lists IAM users in the AWS account.", inputSchema: { type: "object", properties: {} } },
  • Input schema for 'list_iam_users' tool: an empty object, indicating no input parameters are needed.
    inputSchema: { type: "object", properties: {} }
  • Initialization of the IAMClient used by the list_iam_users handler.
    const iamClient = new IAMClient({});
  • Import of IAMClient and ListUsersCommand required for the list_iam_users tool implementation.
    import { IAMClient, ListUsersCommand, ListAccessKeysCommand, ListMFADevicesCommand } from "@aws-sdk/client-iam";

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Bhavesh8890/MCP-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server