Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

list_accounts

Retrieve and filter accounts within a domain on the CloudStack MCP Server by account type or state to manage user roles and access effectively.

Instructions

List accounts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accounttypeNoAccount type (0=User, 1=Admin, 2=DomainAdmin)
domainidNoDomain ID to filter accounts
stateNoAccount state

Implementation Reference

  • MCP tool handler function that executes list_accounts: calls CloudStack API via client, processes accounts, formats as text response.
    async handleListAccounts(args: any) {
      const result = await this.cloudStackClient.listAccounts(args);
      const accounts = result.listaccountsresponse?.account || [];
      
      const accountList = accounts.map((account: any) => ({
        id: account.id,
        name: account.name,
        accounttype: account.accounttype,
        domain: account.domain,
        state: account.state,
        receivedbytes: account.receivedbytes,
        sentbytes: account.sentbytes
      }));
    
      return {
        content: [
          {
            type: 'text',
            text: `Found ${accountList.length} accounts:\n\n${accountList
              .map((account: any) => 
                `• ${account.name} (${account.id})\n  Type: ${account.accounttype}\n  Domain: ${account.domain}\n  State: ${account.state}\n  Received: ${account.receivedbytes} bytes\n  Sent: ${account.sentbytes} bytes\n`
              )
              .join('\n')}`
          }
        ]
      };
    }
  • Tool definition and input schema for list_accounts tool.
    {
      name: 'list_accounts',
      description: 'List accounts',
      inputSchema: {
        type: 'object',
        properties: {
          domainid: {
            type: 'string',
            description: 'Domain ID to filter accounts',
          },
          state: {
            type: 'string',
            description: 'Account state',
          },
          accounttype: {
            type: 'number',
            description: 'Account type (0=User, 1=Admin, 2=DomainAdmin)',
          },
        },
        additionalProperties: false,
      },
    },
  • src/server.ts:182-183 (registration)
    Tool dispatch/registration in the MCP server request handler switch statement.
    case 'list_accounts':
      return await this.adminHandlers.handleListAccounts(args);
  • CloudStack client helper method that makes the underlying listAccounts API request.
    async listAccounts(params: CloudStackParams = {}): Promise<CloudStackResponse> {
      return this.request('listAccounts', params);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal insight. 'List accounts' implies a read-only operation, but it doesn't specify authentication requirements, rate limits, pagination behavior, or what happens if no accounts match the filters, leaving critical behavioral traits undocumented.

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 with just two words, 'List accounts', which is front-loaded and wastes no space. However, this conciseness comes at the cost of under-specification, but based on the scoring criteria, it earns full points for brevity and structure.

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 the tool's complexity (3 parameters, no output schema, no annotations), the description is incomplete. It fails to explain the tool's purpose in context, usage guidelines, or behavioral aspects, leaving significant gaps for an AI agent to understand and invoke the tool correctly.

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?

The input schema has 100% description coverage, clearly documenting all three parameters (accounttype, domainid, state). The description adds no additional meaning beyond what the schema provides, such as how filters interact or default behaviors, so it meets the baseline score of 3 for high schema coverage.

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 accounts' is a tautology that merely restates the tool name without adding specificity. It doesn't clarify what type of accounts (e.g., user accounts, system accounts) or what scope (e.g., all accounts, filtered accounts) are being listed, nor does it distinguish this tool from sibling list tools like 'list_users' or 'list_domains'.

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?

No guidance is provided on when to use this tool versus alternatives. The description lacks context about prerequisites, appropriate scenarios, or comparisons to sibling tools such as 'list_users', making it unclear when this tool is the correct choice for an AI agent.

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