Calculate a CIDR block
calculate_cidrReturn the network, broadcast, host range, and host count for an IPv4 or IPv6 CIDR. Optionally test whether an address is inside it, split it, or merge it with other CIDRs.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"cidr": "<cidr>"
},
"name": "calculate_cidr"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cidr | Yes | IPv4 or IPv6 CIDR, such as 192.168.1.0/24 or 2001:db8::/32. A dotted mask may follow the address. | |
| merge | No | Extra CIDRs to aggregate with cidr. | |
| contains | No | Address to test for membership. | |
| splitPrefix | No | Longer prefix to split into, at most 256 networks. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| split | Yes | ||
| merged | Yes | ||
| summary | Yes | ||
| contains | Yes | ||
| splitCount | Yes | ||
| containsDetail | Yes |