Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

create_ssh_key_pair

Generate or upload an SSH key pair on the CloudStack MCP Server to securely access and manage virtual machines and cloud resources.

Instructions

Create a new SSH key pair

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesKey pair name
publickeyNoPublic key string (optional - generates if not provided)

Implementation Reference

  • The main handler function that executes the create_ssh_key_pair tool. It calls the CloudStack client to create the key pair and formats the response with fingerprint and private key.
    async handleCreateSSHKeyPair(args: any) {
      const result = await this.cloudStackClient.createSSHKeyPair({ name: args.name });
      
      return {
        content: [
          {
            type: 'text',
            text: `Created SSH key pair: ${args.name}\nFingerprint: ${result.createsshkeypairresponse?.fingerprint}\nPrivate Key:\n${result.createsshkeypairresponse?.privatekey}`
          }
        ]
      };
    }
  • The tool schema definition including input schema for name (required) and optional publickey.
    {
      name: 'create_ssh_key_pair',
      description: 'Create a new SSH key pair',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: 'Key pair name',
          },
          publickey: {
            type: 'string',
            description: 'Public key string (optional - generates if not provided)',
          },
        },
        required: ['name'],
        additionalProperties: false,
      },
    },
  • src/server.ts:202-203 (registration)
    MCP server registration: dispatches the tool call to the security handler.
    case 'create_ssh_key_pair':
      return await this.securityHandlers.handleCreateSSHKeyPair(args);
  • CloudStack client helper method that makes the API request to createSSHKeyPair.
    async createSSHKeyPair(params: CloudStackParams): Promise<CloudStackResponse> {
      return this.request('createSSHKeyPair', params);
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Create' implies a mutation, but the description doesn't state whether this requires specific permissions, what happens on failure, if the key pair is stored or returned, or any rate limits. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 a single, efficient sentence with zero waste. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place without redundancy or 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 the complexity of creating an SSH key pair (a mutation with security implications), no annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like return values, error handling, or dependencies, leaving critical gaps for an agent to use this tool effectively in a cloud management context.

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?

Schema description coverage is 100%, so the schema already documents both parameters ('name' and 'publickey') with clear descriptions. The description adds no additional meaning beyond what the schema provides, such as explaining naming conventions or public key format. Baseline 3 is appropriate when the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the verb ('Create') and resource ('new SSH key pair'), making the purpose immediately understandable. It distinguishes from sibling tools like 'list_ssh_key_pairs' by focusing on creation rather than listing. However, it doesn't specify what an SSH key pair is used for in this context, which could help differentiate from other creation tools like 'create_volume' or 'create_network'.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing admin permissions), use cases (e.g., for VM access), or when not to use it (e.g., if an existing key pair suffices). With many sibling tools available, this lack of context leaves the agent guessing about appropriate scenarios.

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