Skip to main content
Glama
tao12345666333

Civo MCP Server

list_networks

List all networks available in your Civo cloud account to view their details and status.

Instructions

List available networks on Civo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool definition (schema) for list_networks — declares the tool name, description, and empty inputSchema (no parameters required).
    export const LIST_NETWORKS_TOOL: Tool = {
      name: 'list_networks',
      description: 'List available networks on Civo',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    };
  • src/index.ts:62-91 (registration)
    Server capabilities registration — LIST_NETWORKS_TOOL is registered in the server's tool capabilities map at line 82.
    // Server implementation
    const server = new Server(
      {
        name: 'example-servers/civo',
        version: '0.1.0',
      },
      {
        capabilities: {
          tools: {
            [CREATE_INSTANCE_TOOL.name]: CREATE_INSTANCE_TOOL,
            [LIST_INSTANCES_TOOL.name]: LIST_INSTANCES_TOOL,
            [REBOOT_INSTANCE_TOOL.name]: REBOOT_INSTANCE_TOOL,
            [SHUTDOWN_INSTANCE_TOOL.name]: SHUTDOWN_INSTANCE_TOOL,
            [START_INSTANCE_TOOL.name]: START_INSTANCE_TOOL,
            [RESIZE_INSTANCE_TOOL.name]: RESIZE_INSTANCE_TOOL,
            [DELETE_INSTANCE_TOOL.name]: DELETE_INSTANCE_TOOL,
            [LIST_DISK_IMAGES_TOOL.name]: LIST_DISK_IMAGES_TOOL,
            [GET_DISK_IMAGE_TOOL.name]: GET_DISK_IMAGE_TOOL,
            [LIST_SIZES_TOOL.name]: LIST_SIZES_TOOL,
            [LIST_REGIONS_TOOL.name]: LIST_REGIONS_TOOL,
            [LIST_NETWORKS_TOOL.name]: LIST_NETWORKS_TOOL,
            [CREATE_NETWORK_TOOL.name]: CREATE_NETWORK_TOOL,
            [RENAME_NETWORK_TOOL.name]: RENAME_NETWORK_TOOL,
            [DELETE_NETWORK_TOOL.name]: DELETE_NETWORK_TOOL,
            [LIST_KUBERNETES_CLUSTERS_TOOL.name]: LIST_KUBERNETES_CLUSTERS_TOOL,
            [CREATE_KUBERNETES_CLUSTER_TOOL.name]: CREATE_KUBERNETES_CLUSTER_TOOL,
            [DELETE_KUBERNETES_CLUSTER_TOOL.name]: DELETE_KUBERNETES_CLUSTER_TOOL,
            [LIST_KUBERNETES_VERSIONS_TOOL.name]: LIST_KUBERNETES_VERSIONS_TOOL,
          },
        },
  • src/index.ts:96-118 (registration)
    ListToolsRequestSchema handler — LIST_NETWORKS_TOOL is included in the list of tools returned to clients (line 109).
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        CREATE_INSTANCE_TOOL,
        LIST_INSTANCES_TOOL,
        REBOOT_INSTANCE_TOOL,
        SHUTDOWN_INSTANCE_TOOL,
        START_INSTANCE_TOOL,
        RESIZE_INSTANCE_TOOL,
        DELETE_INSTANCE_TOOL,
        LIST_DISK_IMAGES_TOOL,
        GET_DISK_IMAGE_TOOL,
        LIST_SIZES_TOOL,
        LIST_REGIONS_TOOL,
        LIST_NETWORKS_TOOL,
        CREATE_NETWORK_TOOL,
        RENAME_NETWORK_TOOL,
        DELETE_NETWORK_TOOL,
        LIST_KUBERNETES_CLUSTERS_TOOL,
        CREATE_KUBERNETES_CLUSTER_TOOL,
        DELETE_KUBERNETES_CLUSTER_TOOL,
        LIST_KUBERNETES_VERSIONS_TOOL,
      ],
    }));
  • CallToolRequestSchema handler for 'list_networks' — calls the listNetworks API function and formats the response with network names, IDs, and labels.
    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,
      };
    }
  • Helper function listNetworks() that makes the actual HTTP GET request to CIVO_API_URL/networks and returns parsed Network[] data.
    import { CIVO_API_KEY, CIVO_API_URL } from './civo.js';
    
    export interface Network {
      id: string;
      name: string;
      default: boolean;
      cider: string;
      label: string;
    }
    
    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();
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description bears full burden. It only states the action, omitting auth requirements, rate limits, or data freshness. Minimal disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, front-loaded, no wasted words. Perfectly concise for the tool's simplicity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter list tool without output schema, the description is adequate but minimal. It could benefit from noting that it returns available networks or any default behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are zero parameters, and schema coverage is 100%. The description adds no parameter info but is not required. Baseline score of 4 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (list), resource (networks), and platform (Civo). It is precise and distinguishes from sibling tools that list different resources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. For a simple list tool, implicit differentiation is weak.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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