Skip to main content
Glama

subnet_calc

Calculate subnet details from a CIDR or address plus mask, returning network, netmask, wildcard, broadcast, usable host range, and counts for IPv4 and IPv6, including correct /31 and /32 handling.

Instructions

Work out a subnet from a CIDR or an address plus dotted mask: network, netmask, wildcard, broadcast, usable host range and counts. IPv4 and IPv6. Handles /31 point-to-point and /32 host routes correctly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cidrYese.g. 10.10.1.0/24, 192.168.1.37/255.255.255.0, or 2001:db8::/48

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

No annotations are present, so the description carries the transparency burden. It discloses IPv4/IPv6 support and explicitly highlights correct /31 and /32 handling, which are meaningful edge-case behaviors. Its output list also makes clear this is a pure calculation with no side effects, though it does not state what happens on invalid 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?

The definition is exactly two sentences with no filler. The first sentence front-loads the purpose and expected outputs; the second concisely adds protocol support and special cases. Every phrase contributes information an agent needs.

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 single-parameter, low-complexity calculator with no annotations and no output schema, the description lists the outputs, accepted input forms, and important edge cases. It could strengthen by naming exact return field keys or invalid-input behavior, but an agent can select and invoke the tool correctly with the information provided.

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 parameter description already gives examples of CIDR, dotted-mask, and IPv6 forms. The tool description reinforces this and adds edge-case context, but does not meaningfully extend the semantic meaning of the cidr parameter. Baseline 3 applies because the schema already documents the parameter well.

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 states a specific action ('work out a subnet') and the resource (CIDR or address/dotted mask), then enumerates concrete outputs (network, netmask, wildcard, broadcast, usable range, counts). This clearly dsistinguishes it from siblingtools such as ip_in_subent (membership check) and ip_convert (format conversion).

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?

The usage is implied by the operation ('work out a subnet'), so the agent can infer when to call it. However, the description does not explicitly mention alternatives or provide when-not-to-use guidance, even though sibling tools exist in the same domain. No routing language distinguishes it from ip_in_subnet or ipv6_normalize.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/labaccessnow/netip-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server