Open Context Protocol is live! 🚀 Read the launch post
createDnsDomainRecord

createDnsDomainRecord

Create Record

Details

  • Method: POST
  • Path: /domains/{dns-domain}/records
  • Operation ID: create-dns-domain-record

Parameters

{
  "name": {
    "description": "The hostname for this DNS record.",
    "required": true,
    "location": "body",
    "type": "string"
  },
  "type": {
    "description": "The DNS record type.\n\n* A\n* AAAA\n* CNAME\n* NS\n* MX\n* SRV\n* TXT\n* CAA\n* SSHFP",
    "required": true,
    "location": "body",
    "type": "string"
  },
  "data": {
    "description": "The DNS data for this record type.",
    "required": true,
    "location": "body",
    "type": "string"
  },
  "ttl": {
    "description": "Time to Live in seconds.",
    "required": false,
    "location": "body",
    "type": "integer"
  },
  "priority": {
    "description": "DNS priority. Does not apply to all record types. (Only required for MX and SRV)",
    "required": false,
    "location": "body",
    "type": "integer"
  }
}

Response Schema

{
  "type": "object",
  "properties": {
    "record": {
      "title": "dns-record",
      "type": "object",
      "x-tags": [
        "dns"
      ],
      "description": "DNS Record information.",
      "x-examples": {
        "dns-record": {
          "id": "cb676a46-66fd-4dfb-b839-443f2e6c0b60",
          "type": "A",
          "name": "foo.example.com",
          "data": "192.0.2.123",
          "priority": 0,
          "ttl": 300
        }
      },
      "properties": {
        "id": {
          "description": "A unique ID for the DNS Record.",
          "type": "string"
        },
        "type": {
          "type": "string",
          "description": "The DNS record type.\n\n* A\n* AAAA\n* CNAME\n* NS\n* MX\n* SRV\n* TXT\n* CAA\n* SSHFP"
        },
        "name": {
          "type": "string",
          "description": "The hostname for this DNS record."
        },
        "data": {
          "type": "string",
          "description": "The DNS data for this record type."
        },
        "priority": {
          "type": "integer",
          "description": "DNS priority. Does not apply to all record types."
        },
        "ttl": {
          "type": "integer",
          "description": "Time to Live in seconds."
        }
      }
    }
  }
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('vultr')

# Call this tool
result = await agent.call_tool('createDnsDomainRecord', {
    # Add required parameters here
})