list_service_offerings
Retrieve and filter compute plans (service offerings) on the CloudStack MCP Server, enabling efficient resource management by listing available configurations based on domain or system criteria.
Instructions
List service offerings (compute plans)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domainid | No | Domain ID to filter offerings | |
| issystem | No | Show system offerings |
Implementation Reference
- src/handlers/admin-handlers.ts:275-304 (handler)The main handler function that executes the tool logic: fetches service offerings from CloudStack client and formats them into a structured text response.async handleListServiceOfferings(args: any) { const result = await this.cloudStackClient.listServiceOfferings(args); const offerings = result.listserviceofferingsresponse?.serviceoffering || []; const offeringList = offerings.map((offering: any) => ({ id: offering.id, name: offering.name, displaytext: offering.displaytext, cpunumber: offering.cpunumber, cpuspeed: offering.cpuspeed, memory: offering.memory, storagetype: offering.storagetype, iscustomized: offering.iscustomized, issystem: offering.issystem, created: offering.created })); return { content: [ { type: 'text', text: `Found ${offeringList.length} service offerings:\n\n${offeringList .map((offering: any) => `• ${offering.name} (${offering.id})\n Display Text: ${offering.displaytext}\n CPUs: ${offering.cpunumber} @ ${offering.cpuspeed}MHz\n Memory: ${offering.memory}MB\n Storage Type: ${offering.storagetype}\n Customized: ${offering.iscustomized}\n System: ${offering.issystem}\n Created: ${offering.created}\n` ) .join('\n')}` } ] }; }
- Tool definition with name, description, and input schema specifying optional parameters issystem and domainid.name: 'list_service_offerings', description: 'List service offerings (compute plans)', inputSchema: { type: 'object', properties: { issystem: { type: 'boolean', description: 'Show system offerings', default: false, }, domainid: { type: 'string', description: 'Domain ID to filter offerings', }, }, additionalProperties: false, }, },
- src/server.ts:196-197 (registration)MCP server switch case that registers and dispatches the tool call to the corresponding admin handler method.case 'list_service_offerings': return await this.adminHandlers.handleListServiceOfferings(args);
- src/cloudstack-client.ts:128-130 (helper)CloudStack client helper method that sends the 'listServiceOfferings' API request to the CloudStack server.async listServiceOfferings(params: CloudStackParams = {}): Promise<CloudStackResponse> { return this.request('listServiceOfferings', params); }