Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

list_async_jobs

Track and filter asynchronous jobs in the CloudStack MCP Server by status or keyword to monitor pending, successful, or failed tasks for efficient cloud resource management.

Instructions

List asynchronous jobs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jobstatusNoJob status (0=pending, 1=success, 2=error)
keywordNoKeyword to search jobs

Implementation Reference

  • Executes the tool logic: calls CloudStack API, processes async jobs response, maps fields, and returns formatted text list.
    async handleListAsyncJobs(args: any) {
      const result = await this.cloudStackClient.listAsyncJobs(args);
      const jobs = result.listasyncjobsresponse?.asyncjobs || [];
      
      const jobList = jobs.map((job: any) => ({
        jobid: job.jobid,
        cmd: job.cmd,
        jobstatus: job.jobstatus,
        created: job.created,
        userid: job.userid,
        instancetype: job.jobinstancetype,
        instanceid: job.jobinstanceid
      }));
    
      return {
        content: [
          {
            type: 'text',
            text: `Found ${jobList.length} async jobs:\n\n${jobList
              .map((job: any) => 
                `• Job ID: ${job.jobid}\n  Command: ${job.cmd}\n  Status: ${job.jobstatus}\n  Created: ${job.created}\n  Instance: ${job.instancetype} (${job.instanceid})\n`
              )
              .join('\n')}`
          }
        ]
      };
    }
  • Tool definition with name, description, and input schema (jobstatus, keyword).
    {
      name: 'list_async_jobs',
      description: 'List asynchronous jobs',
      inputSchema: {
        type: 'object',
        properties: {
          jobstatus: {
            type: 'number',
            description: 'Job status (0=pending, 1=success, 2=error)',
          },
          keyword: {
            type: 'string',
            description: 'Keyword to search jobs',
          },
        },
        additionalProperties: false,
      },
    },
  • src/server.ts:172-173 (registration)
    Dispatches the tool call to the monitoring handler in the MCP server switch statement.
    case 'list_async_jobs':
      return await this.monitoringHandlers.handleListAsyncJobs(args);
  • CloudStack client method that makes the underlying API request for listing async jobs.
    async listAsyncJobs(params: CloudStackParams = {}): Promise<CloudStackResponse> {
      return this.request('listAsyncJobs', params);
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure but only states the action without details on permissions, rate limits, pagination, or output format. It doesn't explain what 'asynchronous jobs' entail in this context or how results are returned, leaving significant gaps for a tool that likely involves operational data.

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 with zero wasted words. It's front-loaded with the core purpose and appropriately sized for a simple listing tool, making it easy to parse quickly.

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 complexity of listing jobs (which may involve status tracking and search), no annotations, and no output schema, the description is insufficient. It doesn't cover behavioral aspects like what constitutes a job, how results are structured, or error handling, leaving the agent with incomplete information for proper tool invocation.

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 the input schema fully documents both parameters (jobstatus and keyword). The description adds no additional parameter semantics beyond what's in the schema, but this is acceptable given the high coverage, resulting in a baseline score of 3.

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

Purpose4/5

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

The description 'List asynchronous jobs' clearly states the verb ('List') and resource ('asynchronous jobs'), making the tool's purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'list_accounts' or 'list_virtual_machines' beyond the resource type, missing specific scope or filtering characteristics that would distinguish it more clearly.

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

Usage Guidelines2/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. It doesn't mention prerequisites, context for job listing, or compare it to other list tools in the sibling set, leaving the agent to infer usage based on the name alone.

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