Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

list_ssh_key_pairs

Use this tool to list SSH key pairs on the CloudStack MCP Server, enabling efficient management of cloud resources by filtering results based on key pair names or fingerprints.

Instructions

List SSH key pairs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fingerprintNoKey fingerprint to filter
nameNoKey pair name to filter

Implementation Reference

  • Main handler function that executes the list_ssh_key_pairs tool by calling CloudStack API, processing key pairs data, and returning formatted MCP response.
    async handleListSSHKeyPairs(args: any) {
      const result = await this.cloudStackClient.listSSHKeyPairs(args);
      const keyPairs = result.listsshkeypairsresponse?.sshkeypair || [];
      
      const keyPairList = keyPairs.map((keyPair: any) => ({
        name: keyPair.name,
        fingerprint: keyPair.fingerprint,
        account: keyPair.account,
        domain: keyPair.domain
      }));
    
      return {
        content: [
          {
            type: 'text',
            text: `Found ${keyPairList.length} SSH key pairs:\n\n${keyPairList
              .map((keyPair: any) => 
                `• ${keyPair.name}\n  Fingerprint: ${keyPair.fingerprint}\n  Account: ${keyPair.account}\n  Domain: ${keyPair.domain}\n`
              )
              .join('\n')}`
          }
        ]
      };
    }
  • Tool definition including name, description, and input schema for list_ssh_key_pairs.
      name: 'list_ssh_key_pairs',
      description: 'List SSH key pairs',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: 'Key pair name to filter',
          },
          fingerprint: {
            type: 'string',
            description: 'Key fingerprint to filter',
          },
        },
        additionalProperties: false,
      },
    },
  • src/server.ts:200-201 (registration)
    Registration in the MCP server switch statement that routes calls to list_ssh_key_pairs to the security handler.
    case 'list_ssh_key_pairs':
      return await this.securityHandlers.handleListSSHKeyPairs(args);
  • Helper method in CloudStack client that makes the underlying API request for listing SSH key pairs.
    async listSSHKeyPairs(params: CloudStackParams = {}): Promise<CloudStackResponse> {
      return this.request('listSSHKeyPairs', params);
    }
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It only states the action without details on permissions, rate limits, pagination, or output format. This is inadequate for a tool with potential complexity in listing operations.

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?

The description is extremely concise with a single sentence, 'List SSH key pairs', which is front-loaded and wastes no words. It efficiently conveys the core action without unnecessary elaboration.

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

Completeness2/5

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

Given no annotations, no output schema, and a tool that likely returns a list of key pairs, the description is incomplete. It fails to explain behavioral traits, return values, or usage context, leaving significant gaps for an AI agent to understand the tool fully.

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

Parameters3/5

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

The input schema has 100% description coverage, documenting both 'fingerprint' and 'name' as filters. The description adds no parameter semantics beyond what the schema provides, so it meets the baseline for high schema coverage without compensating value.

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

Purpose3/5

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

The description 'List SSH key pairs' states the verb ('List') and resource ('SSH key pairs'), providing a basic purpose. However, it lacks specificity about scope (e.g., all key pairs or filtered) and does not distinguish it from sibling tools like 'create_ssh_key_pair', making it vague but functional.

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, such as filtering options or prerequisites. The description does not mention sibling tools or contexts, leaving usage unclear beyond the basic action.

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

Related 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/phantosmax/cloudstack-mcp-server'

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