Skip to main content
Glama

list_records

Query and filter DNS records of a website using site ID, record name, match type, and other parameters to retrieve details like value, priority, and authentication configurations.

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
bizNameNoThe business scenario of the record for acceleration. Valid values: image_video: video and image. api: API.web: web page.
pageNumberNoThe page number. Default value: 1.
pageSizeNoThe number of entries per page. Default value: 500.
proxiedNoFilters by whether the record is proxied. Valid values:true, false
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.
recordNameNoThe record name. This parameter specifies a filter condition for the query.
siteIdYesThe website ID, which can be obtained by calling the ListSites operation.
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.
typeNoThe DNS record type.

Implementation Reference

  • The main handler function for the 'list_records' tool. It extracts the arguments, calls the API service's listRecords method, and returns the result as JSON text.
    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 input schema for MCP registration.
    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, }, }, };
  • API service wrapper method listRecords that constructs the request and calls the underlying ESA client to list records.
    listRecords(params: ListRecordsRequest) { const request = new ListRecordsRequest(params); return this.callApi( this.client.listRecords.bind(this.client) as ApiMethod< ListRecordsRequest, ListRecordsResponse >, request, ); }
  • Inclusion of the list_records handler in the esaHandlers object, which registers all ESA tools for the MCP server.
    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, };
  • LIST_RECORDS_TOOL is included in the ESA_OPENAPI_SITE_LIST array for tool registration.
    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, ];

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