Skip to main content
Glama

Subnet calculator (IPv4 / IPv6)

subnet_calc
Read-onlyIdempotent

Calculate IPv4/IPv6 subnet details such as network, broadcast, host ranges, masks, and address types; split networks into equal subnets or allocate VLSM blocks by host counts.

Instructions

IPv4: from "192.168.1.0/26", "10.0.0.5 255.255.255.0" or a wildcard mask, get network, broadcast, first/last host, usable and total addresses, netmask, wildcard, class, address type (private, CGNAT, loopback, documentation…), integer/hex/binary forms; optionally split into N equal subnets or allocate VLSM blocks by host counts ("Sales:50, Ops:20"). /31 and /32 follow RFC 3021. IPv6: compressed (RFC 5952) and expanded forms, network, first/last address, address count, number of /64s, reverse DNS name and type. Web version: https://s3eidat.github.io/subnet-calc/

Input Schema

NameRequiredDescriptionDefault
vlsmNoIPv4: VLSM host requirements, e.g. "50, 20, 10" or "Sales:50, Ops:20". Largest first, each block aligned.
splitNoIPv4: split the network into at least this many equal subnets (rounded up to a power of two; first 4096 listed).
prefixNoPrefix length to use when "address" has none (default /24 for IPv4, /128 for IPv6), or to override it.
addressYesIPv4 or IPv6 address, optionally with /prefix (or an IPv4 dotted mask after a space or slash).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the read-only/idempotent/no-network profile, and the description adds real behavioral detail beyond them: /31 and /32 follow RFC 3021, default prefixes (/24 IPv4, /128 IPv6), and that split lists at most the first 4096 subnets. It does not describe invalid-input behavior or whether split and VLSM can be combined, so not a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One dense paragraph cleanly split into "IPv4: …" and "IPv6: …" with the highest-value output list front-loaded. Nearly every clause carries information, though the trailing web-version URL is low-value for an agent and the single-block layout makes it slightly harder to scan than bulleted feature groups.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description compensates by enumerating the return fields for both families, including edge details (RFC 5952 compression, /64 count, reverse DNS name, 4096-subnet listing cap). Given the read-only annotation set and 100% schema coverage, an agent has enough to invoke this correctly without further documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description still adds value by noting wildcard-mask input (not mentioned in the schema entry for `address`) and by illustrating VLSM syntax ("Sales:50, Ops:20") and RFC 3021 handling that conditions the prefix parameter. It stops short of explaining parameter interactions, e.g., split + vlsm together.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource (subnet calculation) and enumerates exactly what it returns: network, broadcast, first/last host, usable/total addresses, netmask, wildcard, class, address type. It also names the two optional modes (equal split, VLSM allocation) and covers both IPv4 and IPv6, so an agent knows precisely when this tool applies versus unrelated siblings like ip_in_range or base_convert.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clear usage context is conveyed through concrete accepted input formats ("192.168.1.0/26", "10.0.0.5 255.255.255.0", wildcard mask) and the optional modes ("optionally split into N equal subnets or allocate VLSM blocks by host counts"). It does not state exclusions or name alternative tools for edge cases (e.g., plain IP-in-range checks), which keeps it below a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools