Skip to main content
Glama
widjis
by widjis

ssh_list_credentials

Retrieve all stored SSH credentials from the SSH MCP Server to manage authentication details for remote server connections.

Instructions

List all saved SSH credentials

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for 'ssh_list_credentials' tool. It parses empty args, iterates over the credentialStore Map, creates a sanitized list of credentials (hiding passwords/private keys), formats as text response listing credential IDs, hosts, users, auth type, and last used time.
    private async handleListCredentials(args: unknown) {
      ListCredentialsSchema.parse(args);
      
      const credentials = Array.from(credentialStore.entries()).map(([id, cred]) => ({
        credentialId: id,
        host: cred.host,
        port: cred.port,
        username: cred.username,
        hasPassword: !!cred.password,
        hasPrivateKey: !!cred.privateKeyPath,
        createdAt: cred.createdAt,
        lastUsed: cred.lastUsed
      }));
    
      return {
        content: [
          {
            type: 'text',
            text: credentials.length > 0 
              ? `Saved credentials:\n${credentials.map(c => 
                  `- ${c.credentialId}: ${c.username}@${c.host}:${c.port} (${c.hasPassword ? 'password' : 'key'}) - Last used: ${c.lastUsed}`
                ).join('\n')}`
              : 'No saved credentials found',
          },
        ],
      };
    }
  • src/index.ts:388-396 (registration)
    Registration of the 'ssh_list_credentials' tool in the ListToolsRequest handler response. Defines the tool name, description, and empty input schema.
    {
      name: 'ssh_list_credentials',
      description: 'List all saved SSH credentials',
      inputSchema: {
        type: 'object',
        properties: {},
        required: []
      },
    },
  • src/index.ts:507-508 (registration)
    Registration of the handler in the CallToolRequest switch statement.
    case 'ssh_list_credentials':
      return await this.handleListCredentials(args);
  • Zod schema for input validation of ssh_list_credentials tool (empty object as no parameters required).
    const ListCredentialsSchema = z.object({});
  • In-memory Map storing SSH credentials used by the list_credentials handler.
    const credentialStore = new Map<string, StoredCredential>();
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. It states the action ('List') but doesn't describe what 'saved SSH credentials' entails (e.g., format, scope like user/system-wide), potential side effects (e.g., if listing exposes sensitive data), or output behavior (e.g., pagination, error handling). For a tool with zero annotation coverage, this leaves significant gaps.

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 ('List all saved SSH credentials') that directly conveys the core functionality without any wasted words. It is appropriately sized and front-loaded, making it easy to parse quickly.

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?

Given the tool's low complexity (0 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks details on behavior, output format, or usage context. For a simple list operation, this might suffice, but it doesn't provide a complete picture for an agent to use it effectively without additional assumptions.

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?

The input schema has 0 parameters with 100% coverage, so the schema fully documents the absence of inputs. The description doesn't need to add parameter details, and it correctly implies no parameters are required by not mentioning any. This meets the baseline for tools with no parameters.

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 'List all saved SSH credentials' clearly states the verb ('List') and resource ('saved SSH credentials'), making the tool's purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'ssh_save_credential' or 'ssh_delete_credential' beyond the obvious action difference, which is why it doesn't reach a perfect score.

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 saved credentials first), compare it to similar tools like 'ssh_connect' (which might list active connections), or specify use cases (e.g., credential management vs. connection establishment).

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/widjis/mcp-ssh'

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