Skip to main content
Glama

list_record_sets

Retrieve DNS records from a specified AWS hosted zone to manage domain configurations and verify record details.

Instructions

Lists DNS records for a given hosted zone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hosted_zone_idYesThe ID of the Hosted Zone.

Implementation Reference

  • src/index.ts:694-706 (registration)
    Registration of the 'list_record_sets' tool, including its description and input schema requiring 'hosted_zone_id'.
    name: "list_record_sets", description: "Lists DNS records for a given hosted zone.", inputSchema: { type: "object", properties: { hosted_zone_id: { type: "string", description: "The ID of the Hosted Zone." } }, required: ["hosted_zone_id"] } },
  • Handler function for 'list_record_sets' tool. Uses Route53Client's ListResourceRecordSetsCommand to fetch DNS records for the given hosted zone ID and returns them as JSON.
    if (name === "list_record_sets") { const zoneId = (args as any)?.hosted_zone_id; const command = new ListResourceRecordSetsCommand({ HostedZoneId: zoneId }); const response = await route53Client.send(command); const records = response.ResourceRecordSets?.map(r => ({ Name: r.Name, Type: r.Type, TTL: r.TTL, ResourceRecords: r.ResourceRecords, AliasTarget: r.AliasTarget })) || []; return { content: [{ type: "text", text: JSON.stringify(records, null, 2) }] }; }
  • Import of Route53Client and ListResourceRecordSetsCommand used by the tool.
    import { Route53Client, ListHostedZonesCommand, ListResourceRecordSetsCommand } from "@aws-sdk/client-route-53";
  • Initialization of the Route53Client instance used by the tool.
    const route53Client = new Route53Client({});

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/Bhavesh8890/MCP-server'

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