Skip to main content
Glama

IPv4 subnet calculator

ipv4_subnet
Read-onlyIdempotent

Calculate network, broadcast, host range, mask, and wildcard for an IPv4 CIDR; optionally test if given addresses belong to it.

Instructions

Calculate network, broadcast, host range, mask and wildcard for an IPv4 CIDR (e.g. 192.168.1.10/24 or 10.0.0.0 255.255.0.0). Optionally test whether addresses fall inside it. (Same as IT-Tools /ipv4-subnet-calculator.)

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": {
      "cidr": "<cidr>"
    },
    "name": "ipv4_subnet"
  }
}

Input Schema

NameRequiredDescriptionDefault
cidrYes"a.b.c.d/nn", "a.b.c.d nn.nn.nn.nn" or a bare address (treated as /32)
containsNoAddresses to test for membership

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and openWorldHint=false, so the safety profile is covered. The description adds that the tool is a pure deterministic calculator mirroring IT-Tools and what values it emits, but says nothing about the exact response shape or error behavior for malformed input.

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?

Two tight sentences plus a short provenance note; the primary computation is front-loaded and the optional capability follows. Nothing is redundant with 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?

For a simple, deterministic two-parameter tool with full schema coverage and no output schema, the description tells the agent what is computed and how the optional membership test works. Only the precise shape of returned fields is left unspecified, which is a minor gap.

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%, so the schema already documents both cidr and contains, including the accepted CIDR formats and the /32 default. The description's examples and its phrasing of the contains test add only marginal meaning beyond the schema text, so the 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 ('Calculate') plus the exact resource and enumerates the outputs: network, broadcast, host range, mask, wildcard. The example inputs and the IT-Tools /ipv4-subnet-calculator reference make it clearly distinct from a sibling like ipv4_convert, which merely converts notations.

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 two modes are made explicit: compute fields from a CIDR, and 'optionally test whether addresses fall inside it' via the contains parameter. There is no statement of when NOT to use it or a pointer to an alternative tool, so it stops short of 5.

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