Skip to main content
Glama

subnet_calc

Compute IPv4 subnet details from CIDR notation locally: network and broadcast addresses, usable host range, total hosts, subnet mask, and wildcard mask. Handles /31 and /32 per RFC 3021.

Instructions

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

TableJSON 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.
Behavior5/5

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

Description fully discloses local computation, no network calls, handling of /31 and /32 per RFC 3021, and that it requires no API key and is not rate-limited. No annotations provided, so description carries full burden and meets it thoroughly.

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 a single paragraph of 4 sentences, front-loads the main action, and covers all necessary details without redundancy. Every sentence adds value.

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?

Given the tool's simplicity (1 param, no output schema), the description is complete: it explains the computation, special cases, return fields, and constraints. It compensates for the lack of output schema by describing results.

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?

The single parameter 'cidr' has full schema coverage (100%) with a clear description. The tool description adds context about IPv4 only and special cases but does not significantly augment schema semantics. Baseline of 3 is appropriate.

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 the tool computes IPv4 subnet details from CIDR notation locally, listing specific outputs like network/broadcast addresses and usable host range. It distinguishes from sibling tools (e.g., dns_lookup, ip_info) by emphasizing it's purely computational with no network call.

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

Usage Guidelines5/5

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

Explicitly states 'Use this for IPv4 address planning' and notes it does not query DNS or contact any host. Also mentions no API key needed and not rate-limited, guiding when to choose this over network-dependent siblings.

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

Install Server

Other Tools

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/node-man/dechonet-mcp'

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