Skip to main content
Glama

list_certificates

Retrieve SSL/TLS certificates for a specific website to monitor security status, search by keyword, filter valid certificates, and manage pagination.

Instructions

Lists certificates of a website.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteIdYesThe website ID. Reference Value Source: list_sites. Example: 1234567890123
keywordNoThe search keyword.
validOnlyNoWhether to return only valid certificates.
pageNumberNoThe page number of the returned data.
pageSizeNoThe number of records per page.

Implementation Reference

  • The handler function that implements the core logic of the 'list_certificates' tool. It calls the service API with the provided parameters and returns the result as a standardized tool response.
    export const list_certificates = async (request: CallToolRequest) => {
      const res = await api.listCertificates(
        request.params.arguments as ListCertificatesRequest,
      );
    
      return {
        content: [{ type: 'text', text: JSON.stringify(res) }],
        success: true,
      };
    };
  • The tool registration object defining the schema, name, description, and input validation for 'list_certificates'.
    export const LIST_CERTIFICATES_TOOL: Tool = {
      name: 'list_certificates',
      description: 'Lists certificates of a website.',
      inputSchema: {
        type: 'object',
        properties: {
          siteId: {
            type: 'number',
            description:
              'The website ID. Reference Value Source: list_sites. Example: 1234567890123',
          },
          keyword: {
            type: 'string',
            description: 'The search keyword.',
          },
          validOnly: {
            type: 'boolean',
            description: 'Whether to return only valid certificates.',
          },
          pageNumber: {
            type: 'number',
            description: 'The page number of the returned data.',
          },
          pageSize: {
            type: 'number',
            description: 'The number of records per page.',
          },
        },
        required: ['siteId'],
        annotations: {},
      },
    };
  • Registration list for certificate tools, including LIST_CERTIFICATES_TOOL.
    export const CERTIFICATE_LIST = [
      SET_CERTIFICATE_TOOL,
      APPLY_CERTIFICATE_TOOL,
      GET_CERTIFICATE_TOOL,
      DELETE_CERTIFICATE_TOOL,
      LIST_CERTIFICATES_TOOL,
      GET_CERTIFICATE_QUOTA_TOOL,
    ];
  • Central registration of tool handlers, including 'list_certificates' mapped to its handler function.
    export const esaHandlers: ToolHandlers = {
      site_active_list,
      site_match,
      site_route_list,
      site_record_list,
      routine_create,
      routine_code_commit,
      routine_delete,
      routine_list,
      routine_get,
      routine_code_deploy,
      routine_route_list,
      deployment_delete,
      route_create,
      route_delete,
      route_update,
      route_get,
      er_record_create,
      er_record_delete,
      er_record_list,
      html_deploy,
      create_site,
      update_site_pause,
      get_site_pause,
      create_site_mx_record,
      create_site_ns_record,
      create_site_txt_record,
      create_site_cname_record,
      create_site_a_or_aaaa_record,
      update_record,
      list_records,
      get_record,
      delete_record,
      update_ipv6,
      get_ipv6,
      update_managed_transform,
      get_managed_transform,
      set_certificate,
      apply_certificate,
      get_certificate,
      delete_certificate,
      list_certificates,
      get_certificate_quota,
      list_sites,
    };
  • Helper method in the API service client that performs the actual listCertificates API call to the ESA service.
    listCertificates(params: ListCertificatesRequest) {
      const request = new ListCertificatesRequest(params);
      return this.callApi(
        this.client.listCertificates.bind(this.client) as ApiMethod<
          ListCertificatesRequest,
          ListCertificatesResponse
        >,
        request,
      );
    }

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/aliyun/mcp-server-esa'

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