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,
      );
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses that this is a query operation (implied read-only) and mentions filtering capabilities, which is useful. However, it doesn't describe pagination behavior (implied by pageNumber/pageSize parameters but not explained), rate limits, authentication requirements, or error conditions. For a tool with 9 parameters and no annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences that efficiently state the core purpose and key capability (filtering). Every phrase adds value: 'Domain Name System (DNS) records of a website' specifies the resource, 'including the record value, priority, and authentication configurations' adds detail, and the filtering sentence highlights important parameters. It's appropriately sized and front-loaded with the main function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (9 parameters, no output schema, no annotations), the description is moderately complete. It covers the basic purpose and filtering capability but lacks information about return format, pagination behavior, error handling, and relationship to sibling tools. With no output schema, the description should ideally mention what the query returns, but it only hints at it ('including the record value, priority, and authentication configurations'). This leaves gaps for effective agent usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 9 parameters thoroughly. The description adds marginal value by mentioning 'RecordName and RecordMatchType' as filtering examples, but doesn't provide additional context beyond what's in the schema. It doesn't explain parameter interactions or usage patterns. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Queries a list of Domain Name System (DNS) records of a website' with specific details about what information is included (record value, priority, authentication configurations). It distinguishes itself from sibling tools like 'get_record' (singular) and 'er_record_list' (different scope), but doesn't explicitly contrast with all filtering alternatives. The verb 'queries' is specific and appropriate.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through 'Supports filtering by specifying parameters such as RecordName and RecordMatchType,' suggesting this is for filtered listing operations. However, it doesn't explicitly state when to use this tool versus alternatives like 'list_sites' (for site enumeration) or 'get_record' (for single record retrieval), nor does it mention prerequisites like needing a siteId first. The guidance is present but incomplete.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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