Skip to main content
Glama

Prefix Overlap

prefix_overlap

Check if two IP prefixes overlap, returning whether they are disjoint, contain one another, or equal. Detect conflicts in IP allocation or routing policy.

Instructions

Check if two IP prefixes overlap.

Returns the relationship: disjoint, one contains the other, or equal. Useful for detecting conflicts in IP allocation or routing policy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prefix_aYesFirst IP prefix (e.g. '10.0.0.0/24')
prefix_bYesSecond IP prefix (e.g. '10.0.0.128/25')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
overlapsYes
prefix_aYes
prefix_bYes
relationshipYes'disjoint', 'a_contains_b', 'b_contains_a', 'equal', or 'partial_overlap' (only possible for differing IP versions or malformed input)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior2/5

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

Since no annotations are provided, the description bears full responsibility for disclosing behavior. It does state that it 'returns the relationship' and lists the possible outcomes, but the output schema already conveys that structure. It does not disclose side effects (e.g., whether it is read-only), error handling for invalid prefixes, or edge-case behavior like overlapping but not identical prefixes. The 'Useful for detecting conflicts' phrase is usage context, not behavioral transparency. More is expected given zero annotation coverage.

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 three sentences, all substantive. The first sentence states the core action, the second lists the return values, and the third gives a concrete use case. There is no filler, no redundant restatement of the tool name, and the key information is front-loaded. This is an exemplary concise format.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter tool with an output schema, the description covers purpose and use case adequately. However, it lacks guidance on alternatives, edge cases, or what happens with invalid input. Given that there are no annotations, the description is somewhat thin on safety/read-only implications and differentiation from sibling tools. It is complete enough for a straightforward check but misses opportunities to make the agent fully confident in invocation.

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 description coverage is 100%, with each parameter fully documented including examples ('10.0.0.0/24', '10.0.0.128/25'). The description adds no semantic information about the parameters—it merely refers to 'two IP prefixes' in the purpose, which is redundant with the schema. Per the rubric, a baseline of 3 is appropriate when the schema covers the parameters fully, and the description does not compensate with additional parameter nuances.

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 opens with a specific verb and resource: 'Check if two IP prefixes overlap.' It also enumerates the three possible results (disjoint, one contains the other, or equal), which clearly delineates it from sibling tools like ip_contains (which likely tests a single IP against a prefix) and supernet_aggregate (which computes aggregates). An agent can immediately understand the tool's distinct function.

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?

The description provides a clear application context: 'Useful for detecting conflicts in IP allocation or routing policy.' This gives the agent a reason to select it, but it does not explicitly mention when not to use it or name alternative tools, such as ip_contains for single-IP membership or rpki_validate for routing security checks. It stops short of explicit exclusions, so it earns a 4 rather than a 5.

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