Skip to main content
Glama

list_sizes

Retrieve available instance sizes on Civo cloud platform to select appropriate compute resources for your cloud infrastructure needs.

Instructions

List available instance sizes on Civo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP server handler for the 'list_sizes' tool call. Invokes the listSizes API function, formats the sizes into a text list, and returns it in the expected MCP response format.
    case 'list_sizes': { const sizes = await listSizes(); const sizeList = sizes .map((s: any) => `${s.name} - ${s.description}`) .join('\n'); return { content: [ { type: 'text', text: `Available Sizes:\n${sizeList}`, }, ], isError: false, }; }
  • Tool definition including name, description, and input schema (empty object since no parameters are required). Used for MCP tool listing and validation.
    export const LIST_SIZES_TOOL: Tool = { name: 'list_sizes', description: 'List available instance sizes on Civo', inputSchema: { type: 'object', properties: {}, }, };
  • Core API helper function that performs the HTTP request to Civo's sizes endpoint to retrieve available instance sizes.
    export async function listSizes(): Promise<Size[]> { const url = `${CIVO_API_URL}/sizes`; const response = await fetch(url, { headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${CIVO_API_KEY}`, }, }); if (!response.ok) { throw new Error(`Failed to list sizes: ${response.statusText}`); } return await response.json(); }
  • src/index.ts:80-80 (registration)
    Registers the list_sizes tool in the MCP server's capabilities.tools dictionary.
    [LIST_SIZES_TOOL.name]: LIST_SIZES_TOOL,
  • src/index.ts:107-107 (registration)
    Includes the list_sizes tool in the response to ListToolsRequest.
    LIST_SIZES_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