remove_dns
Remove DNS records by specifying a domain and optional record type to manage DNS configurations in RequestRepo MCP server.
Instructions
Remove DNS records by domain and optional type.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | ||
| record_type | No | ||
| confirm | No |
Implementation Reference
- src/requestrepo_mcp/server.py:209-222 (handler)The remove_dns method in RequestrepoMCPService class contains the core business logic for removing DNS records. It requires confirmation, calls the underlying client's remove_dns method, and returns the updated status along with the domain and record_type.
def remove_dns( self, *, domain: str, record_type: DnsRecordType | None = None, confirm: bool, ) -> dict[str, Any]: self._require_confirm(confirm, "remove_dns") updated = self._client().remove_dns(domain=domain, record_type=record_type) return { "updated": updated, "domain": domain, "record_type": record_type, } - src/requestrepo_mcp/server.py:432-439 (registration)The remove_dns function decorated with @mcp.tool() that registers the tool with the FastMCP server. It accepts domain (required), record_type (optional), and confirm (default False) parameters, and delegates to the service layer.
@mcp.tool() def remove_dns( domain: str, record_type: DnsRecordType | None = None, confirm: bool = False, ) -> dict[str, Any]: """Remove DNS records by domain and optional type.""" return resolved_service.remove_dns(domain=domain, record_type=record_type, confirm=confirm) - src/requestrepo_mcp/schemas.py:10-10 (schema)The DnsRecordType type definition used by remove_dns for the record_type parameter. It's a Literal type that allows values: 'A', 'AAAA', 'CNAME', 'TXT'.
DnsRecordType = Literal["A", "AAAA", "CNAME", "TXT"]