apply_certificate
Request a free SSL certificate for specified domains and site ID. Supports Let's Encrypt or Digicert options for single or wildcard domains.
Instructions
Applies for a free SSL certificate.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domains | Yes | The list of domain names, separated by commas. Example: "example.com,www.example.com" | |
| siteId | Yes | Site ID. Example: 1234567890123. Reference Value Source: list_sites | |
| type | Yes | The type of certificate. Possible values: - lets_encrypt (Let's Encrypt certificate) - digicert_single (Digicert single-domain certificate) - digicert_wildcard (Digicert wildcard certificate) |
Implementation Reference
- src/tools/site/certificate.ts:204-213 (handler)The primary MCP tool handler for 'apply_certificate'. It receives the tool call request, invokes the underlying API service, and returns the response as MCP content.export const apply_certificate = async (request: CallToolRequest) => { const res = await api.applyCertificate( request.params.arguments as ApplyCertificateRequest, ); return { content: [{ type: 'text', text: JSON.stringify(res) }], success: true, }; };
- src/tools/site/certificate.ts:64-90 (registration)Tool registration definition including name, description, and input schema for the 'apply_certificate' tool.export const APPLY_CERTIFICATE_TOOL: Tool = { name: 'apply_certificate', description: 'Applies for a free SSL certificate.', inputSchema: { type: 'object', properties: { siteId: { type: 'number', description: 'Site ID. Example: 1234567890123. Reference Value Source: list_sites', }, domains: { type: 'string', description: 'The list of domain names, separated by commas. Example: "example.com,www.example.com"', }, type: { type: 'string', description: "The type of certificate. Possible values: - lets_encrypt (Let's Encrypt certificate) - digicert_single (Digicert single-domain certificate) - digicert_wildcard (Digicert wildcard certificate) ", }, }, required: ['siteId', 'domains', 'type'], annotations: {}, }, };
- src/tools/site/certificate.ts:67-89 (schema)Input schema definition for the 'apply_certificate' tool, specifying parameters siteId, domains, and type.inputSchema: { type: 'object', properties: { siteId: { type: 'number', description: 'Site ID. Example: 1234567890123. Reference Value Source: list_sites', }, domains: { type: 'string', description: 'The list of domain names, separated by commas. Example: "example.com,www.example.com"', }, type: { type: 'string', description: "The type of certificate. Possible values: - lets_encrypt (Let's Encrypt certificate) - digicert_single (Digicert single-domain certificate) - digicert_wildcard (Digicert wildcard certificate) ", }, }, required: ['siteId', 'domains', 'type'], annotations: {}, },
- src/tools/list-esa-function.ts:143-150 (registration)Inclusion of APPLY_CERTIFICATE_TOOL in the CERTIFICATE_LIST array, part of aggregating tools for MCP registration.export const CERTIFICATE_LIST = [ SET_CERTIFICATE_TOOL, APPLY_CERTIFICATE_TOOL, GET_CERTIFICATE_TOOL, DELETE_CERTIFICATE_TOOL, LIST_CERTIFICATES_TOOL, GET_CERTIFICATE_QUOTA_TOOL, ];
- src/utils/service.ts:509-518 (helper)Helper method in the API service client that wraps the Alibaba Cloud ESA 'applyCertificate' call.applyCertificate(params: ApplyCertificateRequest) { const request = new ApplyCertificateRequest(params); return this.callApi( this.client.applyCertificate.bind(this.client) as ApiMethod< ApplyCertificateRequest, ApplyCertificateResponse >, request, ); }