list_hosted_zones
Retrieve all Route53 hosted zones to manage DNS configurations and domain records in AWS.
Instructions
Lists all Route53 Hosted Zones.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:708-714 (registration)Registration of the 'list_hosted_zones' tool in the ListToolsRequestSchema handler, including name, description, and empty input schema.name: "list_hosted_zones", description: "Lists all Route53 Hosted Zones.", inputSchema: { type: "object", properties: {} } },
- src/index.ts:2157-2169 (handler)Handler implementation for 'list_hosted_zones' tool. Sends ListHostedZonesCommand to Route53 client and formats the response with hosted zone details.if (name === "list_hosted_zones") { const command = new ListHostedZonesCommand({}); const response = await route53Client.send(command); const zones = response.HostedZones?.map(z => ({ Id: z.Id, Name: z.Name, Config: z.Config, ResourceRecordSetCount: z.ResourceRecordSetCount })) || []; return { content: [{ type: "text", text: JSON.stringify(zones, null, 2) }] }; }
- src/index.ts:710-713 (schema)Input schema for the tool: empty object (no parameters).inputSchema: { type: "object", properties: {} }
- src/index.ts:70-70 (helper)Initialization of the Route53Client used by the handler.const route53Client = new Route53Client({});
- src/index.ts:36-36 (helper)Import of Route53Client and ListHostedZonesCommand.import { Route53Client, ListHostedZonesCommand, ListResourceRecordSetsCommand } from "@aws-sdk/client-route-53";