update_ssl
Modify SSL certificate attributes like label, PEM format, SNI, client configuration, or validity timestamps using the APISIX-MCP server’s Admin API integration.
Instructions
Update specific attributes of an existing SSL certificate
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | SSL certificate ID | |
| ssl | No | SSL certificate configuration object |
Implementation Reference
- src/tools/ssl.ts:15-17 (handler)The registration of the 'update_ssl' tool includes the inline handler function that executes a PATCH request to the Admin API to update specific attributes of an existing SSL certificate.server.tool("update_ssl", "Update specific attributes of an existing SSL certificate", UpdateSSLSchema.shape, async (args) => { return await makeAdminAPIRequest(`/ssls/${args.id}`, "PATCH", args.ssl); });
- src/schemas/ssl.ts:29-32 (schema)Zod schema definition for the 'update_ssl' tool inputs, consisting of an SSL certificate ID and partial SSL configuration.export const UpdateSSLSchema = createNullablePatchSchema(z.object({ id: z.string().describe("SSL certificate ID"), ssl: SSLSchema.partial(), }));
- src/index.ts:27-27 (registration)Invocation of setupSSLTools function which registers the 'update_ssl' tool among other SSL tools on the MCP server.setupSSLTools(server);
- src/schemas/ssl.ts:4-27 (schema)Base SSLSchema used in UpdateSSLSchema for SSL certificate configuration object.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");