Skip to main content
Glama

Ip Contains

ip_contains

Check whether an IP address or CIDR prefix falls within a given network. Resolve membership questions like 'is 10.5.5.1 in 10.0.0.0/8?'.

Instructions

Check if an IP address or prefix is within a network.

Answers questions like 'is 10.5.5.1 in 10.0.0.0/8?' or 'is 192.168.1.0/24 inside 192.168.0.0/16?'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesIP address or prefix to check (e.g. '10.5.5.1')
networkYesIP network in CIDR (e.g. '10.0.0.0/8')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
detailYes
addressYes
networkYes
containsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It explains that both bare IPs and CIDR prefixes are accepted and illustrates the containment relation, which is useful. It does not address edge cases like invalid CIDR, IPv4/IPv6 handling, or strict vs inclusive containment, though the presence of an output schema mitigates the missing return-type detail.

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 informative sentence followed by two illustrative examples, with no filler or repetition. The core action is front-loaded, and every sentence earns its place.

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 two-parameter pure predicate with a fully documented schema and an output schema, this description is nearly sufficient. The only material gap is the lack of guidance on special cases or exact containment semantics, but the structured fields cover much of what an agent needs.

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 input schema already provides full descriptions for both parameters with 100% coverage, so the baseline is 3. The description's examples reinforce valid values but do not add semantic information beyond what the schema already states.

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 opening line states a specific predicate: checking whether an IP address or prefix is contained within a network. The two concrete questions remove ambiguity by showing both an IP-in-network case and a prefix-in-prefix case, which clearly separates this from overlap or general routing tools.

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 'Answers questions like...' examples give clear context for when the tool is relevant, so usage is not merely implied. However, it does not name alternatives such as prefix_overlap or subnet_split, nor does it state when not to use this tool.

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