Skip to main content
Glama

private-keys

Manage SSH private keys for Coolify deployments to enable secure server access and authentication.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationYesOperation to perform
idNoPrivate Key UUID
bodyNoJSON request body

Implementation Reference

  • Core handler function for the 'private-keys' tool. Parses arguments and dispatches to API operations (list, get, create, update, delete) using safeApiCall wrapper.
    export async function privateKeysHandler(args: PrivateKeysToolArgs) { const { operation, id, body } = args; switch (operation) { case 'list': return await safeApiCall(() => listPrivateKeys()); case 'get': if (!id) throw new Error('ID required for get operation'); return await safeApiCall(() => getPrivateKeyByUuid({ path: { uuid: id } })); case 'create': if (!body) throw new Error('Body required for create operation'); const createData = JSON.parse(body); return await safeApiCall(() => createPrivateKey({ body: createData })); case 'update': if (!id || !body) throw new Error('ID and body required for update operation'); const updateData = JSON.parse(body); return await safeApiCall(() => updatePrivateKey({ path: { uuid: id }, body: updateData } as any)); case 'delete': if (!id) throw new Error('ID required for delete operation'); return await safeApiCall(() => deletePrivateKeyByUuid({ path: { uuid: id } })); default: throw new Error(`Unknown operation: ${operation}`); } }
  • Zod schema defining input parameters for the 'private-keys' MCP tool: operation (enum), optional id, optional body.
    operation: z.enum([ 'list', 'get', 'create', 'update', 'delete' ]).describe("Operation to perform"), id: z.string().optional().describe("Private Key UUID"), body: z.string().optional().describe("JSON request body") }, async ({ operation, id, body }) => {
  • MCP server.tool registration for 'private-keys' tool, including Zod schema and error-handling wrapper around privateKeysHandler.
    server.tool( 'private-keys', { operation: z.enum([ 'list', 'get', 'create', 'update', 'delete' ]).describe("Operation to perform"), id: z.string().optional().describe("Private Key UUID"), body: z.string().optional().describe("JSON request body") }, async ({ operation, id, body }) => { try { console.error('Private-keys tool received args:', JSON.stringify({ operation, id, body }, null, 2)); const result = await privateKeysHandler({ operation, id, body }); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : String(error)}` }], isError: true }; } } );

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/FelixAllistar/coolify-mcp'

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