Skip to main content
Glama

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
NameRequiredDescriptionDefault
idNoSSL certificate ID
sslNoSSL certificate configuration object

Implementation Reference

  • 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);
    });
  • 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);
  • 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");

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