Skip to main content
Glama

Agent Data Tools: Utilities

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 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

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": "ip_cidr"
  }
}

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover safety (readOnlyHint, destructiveHint=false, openWorldHint=false), and the description reinforces this with "Reads or computes only and changes nothing." It adds genuinely useful non-schema context the annotations cannot express: the x402/card-key pricing model, first 10 free, failed calls free, and the warning that repeats are not free (consistent with idempotentHint=false). It stops short of latency, limits, or response format detail.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The output-field list is front-loaded and useful, but pricing is stated twice — "Price $0.01/call via x402 USDC or a card key (/credits), first 10 free; failed calls free" and then again as "each call is charged, so repeats are not free." That duplication crowds a description whose core job is describing the computation.

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?

There is no output schema, so the description carries the return-value burden, and it does so by enumerating the computed fields. Only minor gaps remain, such as the exact response shape or formatting of the netmask/host values, but nothing an agent needs in order to call it 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 both `cidr` and `ip` are already documented in the schema. The description adds only the example format for `cidr` and restates the membership semantics of `ip` ("whether a given IP falls inside"), which is close to what the schema already says. Baseline 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 names a specific resource (IPv4 network in CIDR notation) and enumerates exactly what is computed: network/broadcast address, first and last usable host, netmask, address count, and membership test. The inline example `cidr=192.168.1.0/24` makes the input form unambiguous, so an agent can distinguish this calculator from lookup-style siblings like ip_info or ip_geolocate.

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 gives a concrete usage context ("Use for firewall rules and allowlists") that tells the agent which tasks this fits. It does not state when-not to use it or name an alternative sibling, but the narrow computational purpose makes the boundary fairly self-evident.

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