Skip to main content
Glama
tao12345666333

Civo MCP Server

list_networks

Retrieve a list of available cloud networks on the Civo platform to manage and configure your infrastructure resources.

Instructions

List available networks on Civo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that executes the logic to list networks from the Civo API.
    export async function listNetworks(): Promise<Network[]> { const url = `${CIVO_API_URL}/networks`; const response = await fetch(url, { headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${CIVO_API_KEY}`, }, }); if (!response.ok) { throw new Error(`Failed to list networks: ${response.statusText}`); } return await response.json(); }
  • Input schema and metadata definition for the list_networks tool.
    export const LIST_NETWORKS_TOOL: Tool = { name: 'list_networks', description: 'List available networks on Civo', inputSchema: { type: 'object', properties: {}, }, };
  • src/index.ts:82-82 (registration)
    Registration of the list_networks tool schema in server capabilities.tools.
    [LIST_NETWORKS_TOOL.name]: LIST_NETWORKS_TOOL,
  • src/index.ts:109-109 (registration)
    Inclusion of the list_networks tool in the ListTools response.
    LIST_NETWORKS_TOOL,
  • MCP protocol handler in the CallToolRequestSchema switch case, which calls the core listNetworks function and formats the response.
    case 'list_networks': { const networks = await listNetworks(); const networkList = networks .map((n: any) => `${n.name} (${n.id}) - ${n.label}`) .join('\n'); return { content: [ { type: 'text', text: `Available Networks:\n${networkList}`, }, ], isError: false, }; }

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