Skip to main content
Glama

Subnet calculator

subnet_calculator
Read-onlyIdempotent

Works out the network, broadcast, host range, netmask and wildcard for an IPv4 or IPv6 address with a prefix, and can split an IPv4 network into equal smaller subnets.

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": {
      "address": "<address>"
    },
    "name": "subnet_calculator"
  }
}

Input Schema

NameRequiredDescriptionDefault
maskNoIPv4 only: prefix length (24 or /24) or dotted mask, when the address has none.
splitNoIPv4 only: split the network into at least this many equal subnets (rounded up to a power of two; the first 256 are listed).
addressYesIPv4 or IPv6 address with a prefix or mask, such as 192.168.1.10/24, 192.168.1.10 255.255.255.0 or 2001:db8::/48.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is covered. The description adds real capability boundaries beyond that: it handles both IPv4 and IPv6, and splitting applies only to IPv4 networks, which tells an agent what will and will not work.

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?

A single front-loaded sentence: the core computation and its outputs come first, the optional split capability follows. No filler, no restatement of the title.

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

Completeness4/5

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

With no output schema, the description carries the burden of describing returns and does so by enumerating the computed values; the split behavior is also mentioned. It stops short of saying how results are shaped (e.g. that a split returns a list) or how invalid input is reported, which is a minor gap for a three-parameter tool.

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

Parameters3/5

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

Schema coverage is 100% and the schema itself documents mask formats, the split power-of-two rounding and the 256-list cap, so the description only needs the baseline. It adds light meaning ('split an IPv4 network into equal smaller subnets') but no format or edge-case detail beyond what the schema already states.

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 pairs a concrete verb ('works out') with the exact outputs (network, broadcast, host range, netmask, wildcard) and the address families it accepts, plus a second capability (splitting IPv4 networks). That is specific enough that an agent can tell this apart from the other calculator siblings without opening the schema.

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

Usage Guidelines3/5

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

Usage is only implied: the mention of 'an IPv4 or IPv6 address with a prefix' and the IPv4-only split hints at valid inputs and limits, but there is no explicit when-to-use framing, no statement that no alternative tool covers this, and no prerequisite guidance. Adequate but leaves routing up to inference.

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.

Resources