get_certificate_quota
Query certificate quota and usage for a specific website ID to monitor SSL certificate availability and consumption
Instructions
Query certificate quota and usage.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| siteId | Yes | The website ID. Reference Value Source: list_sites. Example: 1234567890123 | |
| type | Yes | The type of certificate quota. Example: free |
Implementation Reference
- src/tools/site/certificate.ts:248-257 (handler)The handler function that implements the core logic of the 'get_certificate_quota' tool by invoking the API service and formatting the response.export const get_certificate_quota = async (request: CallToolRequest) => { const res = await api.getCertificateQuota( request.params.arguments as GetCertificateQuotaRequest, ); return { content: [{ type: 'text', text: JSON.stringify(res) }], success: true, }; };
- src/tools/site/certificate.ts:172-191 (registration)The Tool object that registers the tool with MCP, including name, description, and input schema.export const GET_CERTIFICATE_QUOTA_TOOL: Tool = { name: 'get_certificate_quota', description: 'Query certificate quota and usage.', inputSchema: { type: 'object', properties: { siteId: { type: 'number', description: 'The website ID. Reference Value Source: list_sites. Example: 1234567890123', }, type: { type: 'string', description: 'The type of certificate quota. Example: free', }, }, required: ['siteId', 'type'], annotations: {}, }, };
- src/tools/list-esa-function.ts:143-150 (registration)Aggregation of certificate-related tools, including GET_CERTIFICATE_QUOTA_TOOL, into a list for broader 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:553-562 (helper)Helper method in the API service client that wraps the Alibaba Cloud ESA getCertificateQuota API call, used by the tool handler.getCertificateQuota(params: GetCertificateQuotaRequest) { const request = new GetCertificateQuotaRequest(params); return this.callApi( this.client.getCertificateQuota.bind(this.client) as ApiMethod< GetCertificateQuotaRequest, GetCertificateQuotaResponse >, request, ); }