Skip to main content
Glama
hofill
by hofill

list_dns

Retrieve and display DNS records from RequestRepo MCP to inspect domain configurations and manage network settings.

Instructions

List DNS records.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The list_dns handler implementation in RequestrepoMCPService class. It fetches DNS records from the requestrepo client using the dns() method and returns them serialized with a count.
    def list_dns(self) -> dict[str, Any]:
        records = self._client().dns()
        return {
            "count": len(records),
            "records": [serialize_dns_record(record) for record in records],
        }
  • The list_dns tool registration using FastMCP's @mcp.tool() decorator. This exposes the list_dns functionality as an MCP tool with the description 'List DNS records.'
    @mcp.tool()
    def list_dns() -> dict[str, Any]:
        """List DNS records."""
        return resolved_service.list_dns()
  • The serialize_dns_record helper function that converts a DnsRecord object into a dictionary representation with type, domain, and value fields. Used by list_dns to format output.
    def serialize_dns_record(record: DnsRecord) -> dict[str, str]:
        return {
            "type": record.type,
            "domain": record.domain,
            "value": record.value,
        }
  • The DnsRecordType schema definition (Literal type with valid DNS record types A, AAAA, CNAME, TXT). Used by other DNS tools like add_dns, remove_dns, and update_dns.
    DnsRecordType = Literal["A", "AAAA", "CNAME", "TXT"]

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/hofill/RequestRepo-MCP'

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