Skip to main content
Glama

list_disk_images

Retrieve available disk images on Civo cloud platform to select appropriate operating systems or templates for cloud instances.

Instructions

List available disk images on Civo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionNoRegion identifier

Implementation Reference

  • Core handler function that performs the HTTP request to Civo API to list disk images.
    export async function listDiskImages(params: { region?: string; }): Promise<CivoDiskImageList> { checkRateLimit(); const url = new URL(`${CIVO_API_URL}/disk_images`); if (params.region) url.searchParams.set('region', params.region); const response = await fetch(url.toString(), { headers: { Authorization: `Bearer ${CIVO_API_KEY}`, }, }); if (!response.ok) { throw new Error( `Civo API error: ${response.status} ${response.statusText}` ); } return { items: await response.json() }; }
  • MCP server handler for 'list_disk_images' tool that calls the API function and formats the response for the client.
    case 'list_disk_images': { const images = await listDiskImages(args); const imageList = images.items .map( i => `${i.name} (${i.id}) - ${i.distribution} ${i.version} - ${i.state}` ) .join('\n'); return { content: [ { type: 'text', text: `Disk Images:\n${imageList}`, }, ], isError: false, }; }
  • Tool schema definition with input schema for the list_disk_images tool.
    export const LIST_DISK_IMAGES_TOOL: Tool = { name: 'list_disk_images', description: 'List available disk images on Civo', inputSchema: { type: 'object', properties: { region: { type: 'string', description: 'Region identifier', }, }, }, };
  • src/index.ts:78-78 (registration)
    Registration of the list_disk_images tool in the server capabilities.tools dictionary.
    [LIST_DISK_IMAGES_TOOL.name]: LIST_DISK_IMAGES_TOOL,
  • src/index.ts:105-105 (registration)
    Inclusion of the tool in the ListToolsRequestHandler response array.
    LIST_DISK_IMAGES_TOOL,

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/tao12345666333/civo-mcp'

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