{"tools":[{"name":"subnet_calc","description":"IPv4 子网计算器","declaration":{"name":"subnet_calc","description":"IPv4 子网计算器，结果精确、可复现。凡是涉及网络地址、广播地址、可用主机范围、子网掩码、子网划分（等分或按主机数）、VLSM 变长划分、地址类别、是否私有地址的计算，都必须调用本工具，不要自己心算。返回值里的 steps 是逐步的二进制推导过程，可以直接用来讲解。","parameters":{"type":"object","properties":{"ip":{"type":"string","description":"IPv4 地址，如 192.168.1.10；也可以写成 192.168.1.10/24（此时 mask 可省略）"},"mask":{"type":"string","description":"子网掩码：点分十进制（255.255.255.0）或前缀长度（24 或 /24）"},"mode":{"type":"string","enum":["info","split_by_subnets","split_by_hosts","vlsm"],"description":"info=求网络/广播/主机范围/类别；split_by_subnets=等分成至少 n_subnets 个子网；split_by_hosts=每个子网至少容纳 n_hosts 台主机；vlsm=按 host_requirements 做变长划分"},"n_subnets":{"type":"integer","description":"split_by_subnets 模式：需要的子网数量（≥1）"},"n_hosts":{"type":"integer","description":"split_by_hosts 模式：每个子网需要容纳的主机数（≥1）"},"host_requirements":{"type":"array","items":{"type":"integer"},"description":"vlsm 模式：每个子网需要的主机数列表，如 [50, 20, 10, 2]，顺序不限"}},"required":["ip","mode"]}}}]}