Skip to main content
Glama

create_ssl

Generate SSL certificates for secure communication by providing certificate, private key, and optional parameters like SNI or client configurations.

Instructions

Create an SSL certificate

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoSSL certificate ID
sslYesSSL certificate configuration object

Implementation Reference

  • The handler function registered for the "create_ssl" tool. It extracts the id from args and either POSTs the ssl config to /ssls (create) or PUTs to /ssls/{id} (update) using makeAdminAPIRequest.
    server.tool("create_ssl", "Create an SSL certificate", CreateSSLSchema.shape, async (args) => { const sslId = args.id; if (!sslId) { return await makeAdminAPIRequest(`/ssls`, "POST", args.ssl); } else { return await makeAdminAPIRequest(`/ssls/${sslId}`, "PUT", args.ssl); } });
  • Zod input schema for the create_ssl tool, with optional id and required ssl object based on SSLSchema.
    export const CreateSSLSchema = z.object({ id: z.string().optional().describe("SSL certificate ID"), ssl: SSLSchema, });
  • Detailed Zod schema for SSL configuration object used within CreateSSLSchema for the create_ssl tool.
    export const SSLSchema = z .object({ label: z.string().optional().describe("SSL label"), cert: z.string().describe("SSL certificate in PEM format"), certs: z.array(z.string()).optional().describe("SSL certificates in PEM format"), key: z.string().describe("SSL private key in PEM format"), keys: z.array(z.string()).optional().describe("SSL private keys in PEM format"), sni: z.string().optional().describe("Server Name Indication"), snis: z.array(z.string()).optional().describe("Server Name Indications"), client: z .object({ ca: z.string().describe("SSL client CA certificate in PEM format"), depth: z.number().optional().default(1).describe("SSL client verification depth"), skip_mtls_uri_regex: z.array(z.string()).optional().describe("URIs to skip mTLS verification"), }) .optional() .describe("SSL client configuration"), type: z.enum(["server", "client"]).optional().default("server").describe("SSL type"), status: StatusSchema.optional().describe("SSL certificate status"), validity_start: z.number().optional().describe("SSL certificate validity start timestamp"), validity_end: z.number().optional().describe("SSL certificate validity end timestamp"), }) .passthrough() .describe("SSL certificate configuration object");
  • src/index.ts:27-27 (registration)
    High-level registration call that invokes setupSSLTools to add the create_ssl tool (and others) to the MCP server.
    setupSSLTools(server);

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/api7/apisix-mcp'

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