Skip to main content
Glama

private-keys

Manage private keys for Coolify MCP Server by listing, creating, updating, or deleting them using structured JSON operations for secure deployment control.

Input Schema

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

Implementation Reference

  • The privateKeysHandler function implements the logic for the 'private-keys' tool, handling list, get, create, update, and delete operations using generated API calls wrapped in safeApiCall.
    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}`); } }
  • MCP server registration of the 'private-keys' tool, including Zod input schema validation and a wrapper handler that delegates to 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 }; } } );
  • Zod schema defining the input parameters for the 'private-keys' tool: operation (enum), optional id and 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") },

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

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