Skip to main content
Glama

CIDR calculator: calculate the address range, size and netmask of a CIDR block

ip_cidr
Read-only

Details of an IPv4 network in CIDR notation: network and broadcast address, first and last usable host, netmask, number of addresses, and whether a given IP falls inside. Use for firewall rules and allowlists. Example: cidr=192.168.1.0/24. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

NameRequiredDescriptionDefault
ipNoOptional IPv4 address to test for membership
cidrYesIPv4 network in CIDR notation

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so 'reads or computes only and changes nothing' is largely redundant; the real added value is the cost model ($0.01/call, first 25 free, failed calls free) and the note that repeats are not free, which explains the non-obvious idempotentHint=false for a pure computation. Rate limits and error behavior are still unstated.

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?

Output fields are front-loaded in the first sentence, followed by use case, example, pricing, and safety in a compact sequence with no filler. The payment sentence is long but carries decision-relevant information rather than marketing fluff.

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?

With no output schema, enumerating the returned fields in the description is exactly the right compensation, and the cost/permission facts make it safe to call. It still omits response format (JSON structure) and failure/error semantics for invalid CIDR strings.

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%: both `cidr` and the optional `ip` membership-test parameter are already documented in the schema. The description reinforces this ('whether a given IP falls inside') and supplies a format example (cidr=192.168.1.0/24), but adds little the schema doesn't already say, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific resource (an IPv4 network in CIDR notation) and enumerates exactly what it computes: network/broadcast address, first/last usable host, netmask, address count, and membership test. It never routes the agent away from the sibling `ip_info`, so the boundary between 'CIDR math' and 'IP lookup' is inferred rather than stated.

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 for firewall rules and allowlists' plus a concrete example input gives an agent a clear context for reaching for this tool. There are no explicit when-not conditions or named alternatives (e.g., 'use ip_info for geolocation/ASN instead'), so it stops short of full routing 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.