Skip to main content
Glama

ssh_delete_credential

Remove a stored SSH credential by specifying its ID. This tool ensures secure credential management on the SSH MCP Server.

Instructions

Delete a saved SSH credential

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
credentialIdYesCredential ID to delete

Implementation Reference

  • The handler function that parses the input using DeleteCredentialSchema, checks if the credential exists in the in-memory store, deletes it, and returns a 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 parameter 'credentialId' for the ssh_delete_credential tool.
    const DeleteCredentialSchema = z.object({ credentialId: z.string().describe('Credential ID to delete') });
  • src/index.ts:397-407 (registration)
    Registration of the tool in the ListTools response, 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)
    Registration of the tool handler in the CallToolRequest switch statement.
    case 'ssh_delete_credential': return await this.handleDeleteCredential(args);

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