Skip to main content
Glama
widjis
by widjis

ssh_delete_credential

Remove a saved SSH credential from the SSH MCP Server to manage authentication data and maintain security by deleting unused or outdated credentials.

Instructions

Delete a saved SSH credential

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
credentialIdYesCredential ID to delete

Implementation Reference

  • Handler function that parses input, checks if credential exists, deletes it from the in-memory store, and returns success message.
    private async handleDeleteCredential(args: unknown) {
      const params = DeleteCredentialSchema.parse(args);
      
      if (!credentialStore.has(params.credentialId)) {
        throw new McpError(
          ErrorCode.InvalidParams,
          `Credential ID '${params.credentialId}' not found`
        );
      }
    
      const credential = credentialStore.get(params.credentialId)!;
      credentialStore.delete(params.credentialId);
    
      return {
        content: [
          {
            type: 'text',
            text: `Credential '${params.credentialId}' (${credential.username}@${credential.host}) deleted successfully`,
          },
        ],
      };
    }
  • Zod schema defining the input parameters for the ssh_delete_credential tool: credentialId (string).
    const DeleteCredentialSchema = z.object({
      credentialId: z.string().describe('Credential ID to delete')
    });
  • src/index.ts:398-407 (registration)
    Tool registration entry in the ListTools handler, defining name, description, and input schema.
      name: 'ssh_delete_credential',
      description: 'Delete a saved SSH credential',
      inputSchema: {
        type: 'object',
        properties: {
          credentialId: { type: 'string', description: 'Credential ID to delete' }
        },
        required: ['credentialId']
      },
    },
  • src/index.ts:509-510 (registration)
    Dispatch case in the CallToolRequestHandler switch statement that routes to the handler.
    case 'ssh_delete_credential':
      return await this.handleDeleteCredential(args);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Delete') but lacks critical details: whether this is irreversible, if it affects active SSH sessions, what permissions are required, or what happens on success/failure. For a destructive operation, this omission is significant and limits safe usage.

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, direct sentence with zero wasted words. It front-loads the key action ('Delete') and resource, making it easy to parse. Every word earns its place, achieving optimal conciseness for a simple tool.

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 tool's destructive nature and lack of annotations or output schema, the description is incomplete. It doesn't address behavioral risks, error conditions, or return values, leaving gaps for safe invocation. For a delete operation with no structured safety hints, more context is needed to ensure proper use.

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 schema has 100% description coverage, with the parameter 'credentialId' clearly documented in the schema itself. The description adds no additional meaning beyond the schema, such as how to obtain the ID or format requirements. Baseline 3 is appropriate since the schema adequately covers parameter semantics.

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 ('Delete') and resource ('a saved SSH credential'), making the purpose immediately understandable. It distinguishes from siblings like 'ssh_list_credentials' and 'ssh_save_credential' by focusing on deletion rather than listing or creation. However, it doesn't specify the scope (e.g., from local storage or a remote system), which prevents 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 an existing credential), exclusions (e.g., not for active connections), or related tools like 'ssh_list_credentials' for identifying IDs. Without such context, an agent must infer usage from the name alone.

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