Skip to main content
Glama

list_users_without_mfa

Identify IAM users without MFA enabled to enhance AWS account security by detecting potential vulnerabilities.

Instructions

Lists IAM users who do not have MFA enabled.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler logic for the 'list_users_without_mfa' tool. It lists all IAM users and checks each for attached MFA devices using ListMFADevicesCommand, collecting those without MFA.
    if (name === "list_users_without_mfa") {
        const listCmd = new ListUsersCommand({});
        const listResp = await iamClient.send(listCmd);
        const users = listResp.Users || [];
    
        const noMfaUsers = [];
    
        // Checking users sequentially to avoid rate limiting
        for (const user of users) {
            if (!user.UserName) continue;
            try {
                const mfaCmd = new ListMFADevicesCommand({ UserName: user.UserName });
                const mfaResp = await iamClient.send(mfaCmd);
                if (!mfaResp.MFADevices || mfaResp.MFADevices.length === 0) {
                    noMfaUsers.push({
                        UserName: user.UserName,
                        UserId: user.UserId,
                        CreateDate: user.CreateDate,
                        PasswordLastUsed: user.PasswordLastUsed
                    });
                }
            } catch (err) {
                // Ignore errors (e.g. AccessDenied)
            }
        }
    
        return {
            content: [{ type: "text", text: JSON.stringify(noMfaUsers, null, 2) }]
        };
    }
  • src/index.ts:350-356 (registration)
    Registration of the 'list_users_without_mfa' tool in the ListTools response, including its name, description, and empty input schema.
    {
        name: "list_users_without_mfa",
        description: "Lists IAM users who do not have MFA enabled.",
        inputSchema: {
            type: "object",
            properties: {}
        }
  • Input schema for the tool, which takes no parameters.
    description: "Lists IAM users who do not have MFA enabled.",
    inputSchema: {
        type: "object",
        properties: {}
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool lists users, implying a read-only operation, but does not disclose behavioral traits such as permissions required, rate limits, pagination, or output format. This leaves significant gaps for a tool that likely interacts with IAM.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the key information without any wasted words. It directly states the tool's purpose, making it highly concise and well-structured.

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

Completeness2/5

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

Given no annotations, no output schema, and the tool's potential complexity in IAM operations, the description is incomplete. It lacks details on behavioral aspects like authentication needs, error handling, or result format, which are crucial for effective use in a security context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameters need documentation. The description does not add parameter details, which is acceptable given the schema completeness, aligning with the baseline for zero parameters.

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

Purpose5/5

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

The description clearly states the verb ('Lists') and resource ('IAM users') with a specific filter condition ('who do not have MFA enabled'). It distinguishes from the sibling tool 'list_iam_users' by specifying the MFA filter, making the purpose specific and differentiated.

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 implies usage for identifying IAM users without MFA, but does not explicitly state when to use this tool versus alternatives like 'list_iam_users' or other security-related tools. It provides context but lacks explicit guidance on exclusions or prerequisites.

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

Install Server

Other Tools

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/bhaveshopss/MCP-server'

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