Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

list_users

Retrieve a list of users in CloudStack MCP Server by filtering based on account, domain ID, or user state for efficient user management.

Instructions

List users

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNoAccount name to filter users
domainidNoDomain ID to filter users
stateNoUser state

Implementation Reference

  • The handler function that implements the core logic for the 'list_users' tool: fetches users from CloudStack API, maps and formats the data into a readable MCP response.
    async handleListUsers(args: any) {
      const result = await this.cloudStackClient.listUsers(args);
      const users = result.listusersresponse?.user || [];
      
      const userList = users.map((user: any) => ({
        id: user.id,
        username: user.username,
        firstname: user.firstname,
        lastname: user.lastname,
        email: user.email,
        state: user.state,
        account: user.account,
        accounttype: user.accounttype,
        domain: user.domain,
        created: user.created
      }));
    
      return {
        content: [
          {
            type: 'text',
            text: `Found ${userList.length} users:\n\n${userList
              .map((user: any) => 
                `• ${user.username} (${user.id})\n  Name: ${user.firstname} ${user.lastname}\n  Email: ${user.email}\n  State: ${user.state}\n  Account: ${user.account}\n  Domain: ${user.domain}\n  Created: ${user.created}\n`
              )
              .join('\n')}`
          }
        ]
      };
    }
  • The tool schema definition for 'list_users', including name, description, and input schema for MCP tool registration.
    {
      name: 'list_users',
      description: 'List users',
      inputSchema: {
        type: 'object',
        properties: {
          account: {
            type: 'string',
            description: 'Account name to filter users',
          },
          domainid: {
            type: 'string',
            description: 'Domain ID to filter users',
          },
          state: {
            type: 'string',
            description: 'User state',
          },
        },
        additionalProperties: false,
      },
    },
  • src/server.ts:184-185 (registration)
    The switch case in the MCP server that registers and routes 'list_users' tool calls to the appropriate handler.
    case 'list_users':
      return await this.adminHandlers.handleListUsers(args);
  • Helper method in CloudStack client that makes the actual API request to CloudStack's listUsers endpoint.
    async listUsers(params: CloudStackParams = {}): Promise<CloudStackResponse> {
      return this.request('listUsers', params);
    }
Behavior1/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 of behavioral disclosure. 'List users' gives no information about permissions required, pagination, rate limits, output format, or whether this is a read-only operation. For a tool with 3 parameters and no output schema, this is critically inadequate.

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 extremely concise at just two words. While this reflects severe under-specification in other dimensions, from a pure conciseness perspective it's minimal with zero wasted words. Every word earns its place, though there are too few words overall.

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

Completeness1/5

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

Given the tool's complexity (3 parameters, no output schema, no annotations), the description is completely inadequate. It doesn't explain what 'users' means in this context, what the output looks like, or any behavioral characteristics. The agent would struggle to use this tool effectively based solely on the description.

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 description coverage is 100%, so all parameters (account, domainid, state) are documented in the schema. The description adds no additional parameter context beyond what the schema provides. According to guidelines, when schema coverage is high (>80%), the baseline score is 3 even with no param info in the description.

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

Purpose2/5

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

The description 'List users' is a tautology that merely restates the tool name without adding specificity. It doesn't distinguish this tool from other list_* tools in the sibling set (like list_accounts, list_virtual_machines, etc.) or clarify what type of users are being listed (e.g., system users, cloud users, account users).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites, context, or comparison to other tools in the sibling set (like list_accounts which might relate to user accounts). The agent receives no usage direction.

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

Related 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/phantosmax/cloudstack-mcp-server'

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