list_dns
Retrieve and display DNS records from RequestRepo MCP to inspect domain configurations and manage network settings.
Instructions
List DNS records.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_dns"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/requestrepo_mcp/server.py:187-192 (handler)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], } - src/requestrepo_mcp/server.py:412-415 (registration)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, } - src/requestrepo_mcp/schemas.py:10-10 (schema)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"]