Skip to main content
Glama

IP geolocation

ipGeolocation
Read-onlyIdempotent

Look up where an IPv4 or IPv6 address is located and which network it belongs to. Use this for country, region, city, coordinates, ISP, ASN, connection type and local currency, for example to localise a visitor or see where a server is hosted. The location is an estimate and is most reliable at country level. For many IPs at once use bulkIpGeolocation. For VPN, proxy, Tor and threat signals use ipSecurity. For the registered owner of the IP block and its abuse contact use ipWhoisLookup. Private and reserved addresses (10.x, 192.168.x, 127.x and similar) cannot be geolocated and return a "non-routable IP" (HTTP 423) message. Behavior: read-only. Makes one request to the WhoisFreaks API for your WhoisFreaks account (identified by the WHOISFREAKS_API_KEY environment variable or, on the hosted server, by the API key sent with the request or the account connected with OAuth) and uses that account's API credits; nothing is created or changed. If the call fails, the result is a short message instead of data, for example: the API key was refused (invalid, or plan or credits used up) with what to do next, domain extension not supported (HTTP 403), no data found (HTTP 404), or rate limit reached (HTTP 429).

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

Input Schema

NameRequiredDescriptionDefault
ipYesIPv4 or IPv6 address to geolocate. Examples: 8.8.8.8 | 2606:4700:4700::1111

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations (readOnly, idempotent, openWorld already declare the safety profile), the description discloses credit consumption against a specific WhoisFreaks account, how the key is resolved (env var, request key, or OAuth), and that a failure returns a short message rather than data. It itemises concrete failure modes with HTTP codes (423 non-routable, 403, 404, 429) and warns that results are an estimate most reliable at country level.

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?

Purpose and sibling routing are front-loaded in the first two sentences, and the private-address caveat is placed immediately before the behavior section. The error-code enumeration is somewhat dense but each item maps to a distinct recovery action, so little is wasted.

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

Completeness5/5

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

For a one-parameter read-only lookup with a pre-existing output schema gap (none declared), the description covers input constraints, authentication mechanics, credit side effects, and error handling. Nothing an agent needs to call it correctly or interpret a failure is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the single parameter already carries examples, so the baseline is 3. The description adds genuine meaning beyond the schema by noting both IPv4 and IPv6 are accepted and that private/reserved ranges (10.x, 192.168.x, 127.x) will fail with a non-routable error, which guides value selection.

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 uses a specific verb and resource ("Look up where an IPv4 or IPv6 address is located") and enumerates the returned fields (country, region, city, coordinates, ISP, ASN, connection type, local currency). It explicitly distinguishes itself from bulkIpGeolocation, ipSecurity, and ipWhoisLookup, so an agent can separate it from siblings at a glance.

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 concrete when-to-use motivation (localise a visitor, see where a server is hosted) and names three alternatives with the exact condition that selects each: bulk for many IPs, ipSecurity for VPN/proxy/Tor/threat signals, ipWhoisLookup for block ownership and abuse contact. It also states a when-not case: private and reserved ranges cannot be geolocated.

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