Skip to main content
Glama

cidr_shield_lookup

Read-onlyIdempotent

Classify any IPv4 offline via Radix Trie longest-prefix match to flag datacenter, VPN, Tor, proxy, or residential IPs for auth and bot-risk checks—no network calls.

Instructions

Performs sub-millisecond offline Radix Trie Longest Prefix Match (LPM) on any IPv4 address to classify traffic as Datacenter/Cloud (AWS, GCP, Azure, Hetzner), VPN, Tor Exit Node, Public Proxy, or Clean Residential. Use when: Authenticating incoming HTTP requests, preventing bot scraping abuse, or assessing IP risk in auth flows without third-party network latency. Do not use when: Performing DNS lookups, WHOIS domain queries, or analyzing SQL databases. Alternative: Use sqltwin_stream_anonymize for database sanitization, or agentpr_guard_audit for code review. Execution: Runs locally in-memory (<0.01ms), read-only, idempotent, zero network calls, zero telemetry, air-gapped deterministic.

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": {
      "ip": "<ip>"
    },
    "name": "cidr_shield_lookup"
  }
}

Input Schema

NameRequiredDescriptionDefault
ipYesStandard dotted-decimal IPv4 address to classify (e.g., '3.5.10.1', '185.220.101.5').
licenseKeyNoOptional TopAI Sovereign Pro offline license key (or set TOPAI_LICENSE_KEY env variable).

Output Schema

NameRequiredDescriptionDefault
ipYesQueried IPv4 address.
isRiskYesTrue if IP matches automated, proxy, or datacenter origin.
categoryYesClassified category: DATACENTER, VPN, TOR, PROXY, or RESIDENTIAL.
providerYesCloud provider or hosting network name (e.g., 'AWS', 'GCP', 'Hetzner').
confidenceYesClassification confidence score (0.0 to 1.0).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.0.6
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / ip / description
      Previous value: -"IPv4 address (e.g. 3.5.10.1)"New value: +"Standard dotted-decimal IPv4 address to classify (e.g., '3.5.10.1', '185.220.101.5')."
    • addedInput schema / properties / licenseKey
      Added value: +{
      +  "description": "Optional TopAI Sovereign Pro offline license key (or set TOPAI_LICENSE_KEY env variable).",
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "category": {
      +      "description": "Classified category: DATACENTER, VPN, TOR, PROXY, or RESIDENTIAL.",
      +      "type": "string"
      +    },
      +    "confidence": {
      +      "description": "Classification confidence score (0.0 to 1.0).",
      +      "type": "number"
      +    },
      +    "ip": {
      +      "description": "Queried IPv4 address.",
      +      "type": "string"
      +    },
      +    "isRisk": {
      +      "description": "True if IP matches automated, proxy, or datacenter origin.",
      +      "type": "boolean"
      +    },
      +    "provider": {
      +      "description": "Cloud provider or hosting network name (e.g., 'AWS', 'GCP', 'Hetzner').",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "ip",
      +    "category",
      +    "provider",
      +    "isRisk",
      +    "confidence"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the annotations (readOnly, idempotent, openWorld=false, non-destructive), the description adds substantive behavior: offline in-memory operation, <0.01ms execution, zero network calls, zero telemetry, deterministic results. What it does not disclose is whether the optional licenseKey gates any categories or changes results, which is the main behavioral unknown an agent would want.

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?

The structure is strong: purpose first, then Use when / Do not use when / Alternative / Execution. Some phrasing is marketing-flavored ('sub-millisecond', 'TopAI Sovereign Pro offline license key', 'air-gapped deterministic'), which costs a little density but does not obscure the actionable content.

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 an output schema present, return values need no explanation, and the description covers scope, exclusions, and performance characteristics. Remaining gaps are the license-key behavior and invalid-input handling, both of which matter for correct 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 coverage is 100% with both parameters documented (including an example IPv4 format and the env-var fallback for the license), so the schema carries the load. The description adds no meaning about the ip or licenseKey parameters, and does not say how unsupported inputs (e.g. IPv6, malformed addresses) are handled.

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: longest-prefix-match classification of an IPv4 address into named categories (Datacenter/Cloud, VPN, Tor, Proxy, Clean Residential). The output taxonomy is enumerated, so an agent knows exactly what signal it gets back, and none of the sibling tools overlap with this function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit 'Use when' triggers (authenticating HTTP requests, bot scraping, IP risk in auth flows) and explicit 'Do not use when' exclusions (DNS, WHOIS, SQL analysis), plus named alternatives for the excluded cases. This is the full when/when-not/alternative pattern.

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