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); }

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