Skip to main content
Glama

list_records

Query DNS records for a website with filtering options like record name, type, and configuration details to manage domain settings.

Instructions

Queries a list of Domain Name System (DNS) records of a website, including the record value, priority, and authentication configurations. Supports filtering by specifying parameters such as RecordName and RecordMatchType.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteIdYesThe website ID, which can be obtained by calling the ListSites operation.
recordNameNoThe record name. This parameter specifies a filter condition for the query.
recordMatchTypeNoThe match mode to search for the record name. Default value: exact. Valid values: prefix: match by prefix.suffix: match by suffix. exact: exact match. fuzzy: fuzzy match.
pageNumberNoThe page number. Default value: 1.
pageSizeNoThe number of entries per page. Default value: 500.
sourceTypeNoThe origin type of the record. Only CNAME records can be filtered by using this field. Valid values: OSS: OSS bucket. S3: S3 bucket. LB: load balancer. OP: origin pool. Domain: domain name.
bizNameNoThe business scenario of the record for acceleration. Valid values: image_video: video and image. api: API.web: web page.
proxiedNoFilters by whether the record is proxied. Valid values:true, false
typeNoThe DNS record type.

Implementation Reference

  • The handler function for the 'list_records' tool. It extracts parameters as ListRecordsRequest, calls the api.listRecords method, and returns the JSON-stringified response wrapped in the expected MCP format.
    export const list_records = async (request: CallToolRequest) => { const req = request.params.arguments as ListRecordsRequest; const res = await api.listRecords(req); return { content: [{ type: 'text', text: JSON.stringify(res) }], success: true, }; };
  • The Tool object definition for 'list_records', including name, description, and detailed inputSchema for validation (requires siteId, optional filters like recordName, pageNumber, etc.).
    export const LIST_RECORDS_TOOL: Tool = { name: 'list_records', description: 'Queries a list of Domain Name System (DNS) records of a website, including the record value, priority, and authentication configurations. Supports filtering by specifying parameters such as RecordName and RecordMatchType.', inputSchema: { type: 'object', properties: { siteId: { type: 'number', description: 'The website ID, which can be obtained by calling the ListSites operation.', examples: [1234567890456], }, recordName: { type: 'string', description: 'The record name. This parameter specifies a filter condition for the query.', examples: ['www.example.com'], }, recordMatchType: { type: 'string', description: 'The match mode to search for the record name. Default value: exact. Valid values: prefix: match by prefix.suffix: match by suffix. exact: exact match. fuzzy: fuzzy match.', examples: ['fuzzy'], }, pageNumber: { type: 'number', description: 'The page number. Default value: 1.', examples: [1], }, pageSize: { type: 'number', description: 'The number of entries per page. Default value: 500.', examples: [50], }, sourceType: { type: 'string', description: 'The origin type of the record. Only CNAME records can be filtered by using this field. Valid values: OSS: OSS bucket. S3: S3 bucket. LB: load balancer. OP: origin pool. Domain: domain name.', enum: ['OSS', 'S3', 'LB', 'OP', 'Domain', 'IP'], examples: ['OSS'], }, bizName: { type: 'string', description: 'The business scenario of the record for acceleration. Valid values: image_video: video and image. api: API.web: web page.', enum: ['api', 'web', 'video_image'], examples: ['web'], }, proxied: { type: 'boolean', description: 'Filters by whether the record is proxied. Valid values:true, false', enum: [true, false], examples: [true], }, type: { type: 'string', description: 'The DNS record type.', enum: ['A/AAA', 'TXT', 'MX', 'NS', 'SRV', 'CAA', 'CERT', 'SMIMEA', 'SSHFP', 'TLSA', 'URI', 'CNAME'], examples: ['A/AAA'], }, }, required: ['siteId'], annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: false, }, }, };
  • Registration of LIST_RECORDS_TOOL in the ESA_OPENAPI_SITE_LIST array, which aggregates site-related tools for MCP server exposure.
    export const ESA_OPENAPI_SITE_LIST = [ LIST_SITES_TOOL, CREATE_SITE_TOOL, UPDATE_SITE_PAUSE_TOOL, GET_SITE_PAUSE_TOOL, UPDATE_RECORD_TOOL, CREATE_SITE_MX_RECORD_TOOL, CREATE_SITE_NS_RECORD_TOOL, CREATE_SITE_TXT_RECORD_TOOL, CREATE_SITE_CNAME_RECORD_TOOL, CREATE_SITE_A_OR_AAAA_RECORD_TOOL, DELETE_RECORD_TOOL, LIST_RECORDS_TOOL, GET_RECORD_TOOL, ];
  • Maps the 'list_records' handler function to the esaHandlers object, used for routing tool calls to implementations.
    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 client that wraps the Alibaba Cloud ESA listRecords API call, used by the tool handler.
    listRecords(params: ListRecordsRequest) { const request = new ListRecordsRequest(params); return this.callApi( this.client.listRecords.bind(this.client) as ApiMethod< ListRecordsRequest, ListRecordsResponse >, 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