add_dns
Add DNS records to domains for A, AAAA, CNAME, or TXT configurations within the RequestRepo MCP server.
Instructions
Add a DNS record.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | ||
| record_type | Yes | ||
| value | Yes | ||
| confirm | Yes |
Implementation Reference
- src/requestrepo_mcp/server.py:194-207 (handler)The RequestrepoMCPService.add_dns method - the actual handler implementation that validates the confirm parameter, calls the requestrepo client's add_dns method, and returns the result with the record details.
def add_dns( self, *, domain: str, record_type: DnsRecordType, value: str, confirm: bool, ) -> dict[str, Any]: self._require_confirm(confirm, "add_dns") updated = self._client().add_dns(domain=domain, record_type=record_type, value=value) return { "updated": updated, "record": {"type": record_type, "domain": domain, "value": value}, } - src/requestrepo_mcp/server.py:418-430 (registration)The @mcp.tool() decorated function that registers the add_dns tool with the MCP server, accepting domain, record_type, value, and confirm parameters and delegating to resolved_service.add_dns().
def add_dns( domain: str, record_type: DnsRecordType, value: str, confirm: bool, ) -> dict[str, Any]: """Add a DNS record.""" return resolved_service.add_dns( domain=domain, record_type=record_type, value=value, confirm=confirm, ) - src/requestrepo_mcp/schemas.py:10-10 (schema)The DnsRecordType Literal type definition that constrains record_type to valid DNS record types: 'A', 'AAAA', 'CNAME', 'TXT'.
DnsRecordType = Literal["A", "AAAA", "CNAME", "TXT"]