Skip to main content
Glama
tao12345666333

Civo MCP Server

list_disk_images

Retrieve available disk images from the Civo cloud platform to identify operating systems and application templates for creating new cloud instances.

Instructions

List available disk images on Civo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionNoRegion identifier

Implementation Reference

  • MCP server request handler for the 'list_disk_images' tool. It calls the listDiskImages API function, formats the list of disk images into a text response, and returns it.
    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 definition object including name, description, and inputSchema for validating tool inputs.
    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', }, }, }, };
  • Underlying API function that performs the HTTP request to Civo's disk_images endpoint to retrieve the list of 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() }; }
  • src/index.ts:78-78 (registration)
    Registration of the tool in the server's capabilities dictionary.
    [LIST_DISK_IMAGES_TOOL.name]: LIST_DISK_IMAGES_TOOL,
  • src/index.ts:105-105 (registration)
    Inclusion of the tool in the ListTools response.
    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