Skip to main content
Glama

subnet calculator

subnet_calculator

Calculate IPv4 subnet details from CIDR notation. Parses a CIDR block (e.g. 192.168.1.0/24) and returns the network address, broadcast address, subnet mask, wildcard mask, first and last usable host addresses, total and usable host counts, prefix length, and classful IP class (A/B/C/D/E). Essential for homelab network planning, VLAN segmentation, firewall rule design, and understanding address space allocation. Handles special cases for /31 point-to-point links (RFC 3021) and /32 host routes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cidrYesIPv4 address in CIDR notation, e.g. 192.168.1.0/24

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
ip_classYesClassful IP address class: A, B, C, D (multicast), or E (reserved)
last_usableYesLast usable host address in the subnet
subnet_maskYesSubnet mask in dotted decimal notation, e.g. 255.255.255.0
total_hostsYesTotal number of addresses in the subnet including network and broadcast
first_usableYesFirst usable host address in the subnet
usable_hostsYesNumber of usable host addresses (excluding network and broadcast)
prefix_lengthYesCIDR prefix length, e.g. 24
wildcard_maskYesWildcard (inverse) mask, e.g. 0.0.0.255
network_addressYesNetwork address of the subnet
broadcast_addressYesBroadcast address of the subnet

TDQS

A4.6/5.0
Behavior4/5

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

No annotations are provided, so the description must disclose behavioral traits. It mentions special handling for /31 and /32 prefixes, which is a key behavioral detail. However, it does not discuss error handling, validation beyond the pattern, or side effects. For a calculator tool, this is adequate.

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

Conciseness5/5

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

The description is concise, consisting of a few well-structured sentences. It front-loads the primary function and output, then adds use cases and special handling. Every sentence adds value without redundancy.

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?

The tool has a single parameter and an output schema (indicated by context). The description lists all return values and special cases, making it complete. It sufficiently covers what the tool does and what to expect.

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

Parameters5/5

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

The input schema has 100% coverage with a clear description and pattern. The tool description adds further meaning by explaining the expected input format, output details, and special cases. It enhances understanding beyond the schema alone.

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?

The description clearly states 'Calculate IPv4 subnet details from CIDR notation', which is a specific verb and resource. It lists the returned values, making the purpose unambiguous. The sibling tools are all distinct calculators, so this description effectively distinguishes the tool.

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?

The description mentions essential use cases like 'homelab network planning, VLAN segmentation, firewall rule design'. While it provides context for when to use, it lacks explicit guidance on when not to use or alternatives. Given the sibling tools cover different domains, the context is sufficient.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.9/5.0
Disambiguation4/5

Despite 89 tools, each has a clearly distinct purpose with detailed descriptions that often reference related tools. Overlap exists (e.g., multiple LoRa/RF tools), but the descriptions are sufficient to distinguish them. Some confusion possible among similar-sounding tools like attenuator_pi and attenuator_tee, but the descriptions explicitly compare them.

Naming Consistency4/5

Consistent underscore-separated lowercase naming. Most tools follow a verb_noun pattern (e.g., capacitor_charge, wire_gauge) or noun_noun (power_cost). Minor inconsistencies such as 'bmi_calculator' vs 'solar_sizing' but overall predictable.

Tool Count2/5

89 tools is far too many for a single MCP server. This scope is more appropriate for multiple specialized servers. The sheer number will slow agent selection and increase cognitive load, reducing coherence.

Completeness3/5

Covers many domains (RF, solar, PCB, networking, math, etc.) but lacks depth in some areas (e.g., no three-phase power, no airflow calculations). Some domains have comprehensive coverage (LoRa/Meshtastic), but others feel incomplete for the tool count.

Resources