Skip to main content
Glama

Benchline

Calculate a CIDR block

calculate_cidr
Read-onlyIdempotent

Return the network, broadcast, host range, and host count for an IPv4 or IPv6 CIDR. Optionally test whether an address is inside it, split it, or merge it with other CIDRs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cidrYesIPv4 or IPv6 CIDR, such as 192.168.1.0/24 or 2001:db8::/32. A dotted mask may follow the address.
mergeNoExtra CIDRs to aggregate with cidr.
containsNoAddress to test for membership.
splitPrefixNoLonger prefix to split into, at most 256 networks.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
splitYes
mergedYes
summaryYes
containsYes
splitCountYes
containsDetailYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

The annotations already declare read-only, idempotent, and closed-world behavior, so the safety profile is covered. The description adds useful semantic detail by stating which values are computed and which optional transformations are available.

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 sentences, front-loaded with the core return values and followed by optional operations. There is no redundant or wasted text.

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?

The description is complete for a pure calculation tool whose output schema details the return shape and whose annotations define the safety profile. Nothing needed to invoke the tool correctly is missing.

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 cidr, merge, contains, and splitPrefix. The description maps loosely to contains, splitPrefix, and merge, but adds no format or syntax detail beyond the schema, making the baseline of 3 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 states a specific verb and resource: return network, broadcast, host range, and host count for an IPv4 or IPv6 CIDR. It also names optional operations, so an agent can clearly distinguish this from unrelated calculator siblings like calculate_emi or calculate_percentage.

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?

It clearly indicates the optional modes: test membership, split, or merge. There are no alternative tools to route between and no exclusions, but the context for when to use those optional parameters is explicit enough.

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