Skip to main content
Glama

IPv4 Subnet Calculator

subnet_calc
Read-onlyIdempotent

Compute IPv4 subnet details from CIDR notation entirely locally — no network call: network and broadcast addresses, usable host range, total usable hosts, subnet mask, and wildcard mask. /31 and /32 are handled per RFC 3021 (point-to-point / single host). Use this for IPv4 address planning. It does not query DNS or contact any host, so it is purely computational. Requires no API key and is NOT rate-limited (computed in-process). Returns the calculated fields as text.

Input Schema

NameRequiredDescriptionDefault
cidrYesIPv4 address with a CIDR prefix length 0-32 (e.g., '192.168.1.0/24'). IPv4 only; host bits may be any address inside the block.

Output Schema

NameRequiredDescriptionDefault
prefixYesCIDR prefix length
networkYesNetwork address
lastHostNoLast usable host
receiptsNoSigned observation receipts behind this result, one per lookup: when, from where and under which rules version DechoNet observed it. Each url shows the record and checks its Ed25519 signature.
broadcastYesBroadcast address
firstHostNoFirst usable host
reportUrlYesHuman-facing interactive report on dechonet.com
subnetMaskYesDotted-decimal subnet mask
totalHostsYesUsable host count
wildcardMaskNoWildcard (inverse) mask

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / receipts
      Added value: +{
      +  "description": "Signed observation receipts behind this result, one per lookup: when, from where and under which rules version DechoNet observed it. Each url shows the record and checks its Ed25519 signature.",
      +  "items": {
      +    "properties": {
      +      "id": {
      +        "type": "string"
      +      },
      +      "tool": {
      +        "type": "string"
      +      },
      +      "url": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "tool",
      +      "id",
      +      "url"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, and the description is consistent with all of them. Beyond that it adds genuinely useful behavior: no API key required, no rate limiting, in-process computation, and RFC 3021 handling of /31 and /32 — context the annotations cannot convey.

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?

Front-loaded with the core capability and output list, and sized appropriately for a one-param tool. Slight redundancy in restating the local/no-network point twice and enumerating return fields already present in the output schema.

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?

For a simple deterministic calculator with a full output schema and complete annotations, nothing an agent needs is missing. Safety, behavior, edge cases, and inputs are all covered.

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?

Only one parameter, and the schema already documents the CIDR format, prefix range 0-32, and IPv4-only constraint at 100% coverage. The description adds no syntax or format detail beyond the schema, so baseline 3 applies.

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 (Compute) and resource (IPv4 subnet details from CIDR) and enumerates the exact outputs produced. It clearly distinguishes itself from network-oriented siblings like dns_lookup and ip_info by declaring it is purely computational.

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?

"Use this for IPv4 address planning" plus "It does not query DNS or contact any host" implicitly routes the agent away from dns_lookup/reverse_dns for this task. It gives clear context but never names or explicitly excludes a sibling tool, so it stops short of full when/when-not guidance.

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