Skip to main content
Glama

toolkit-mcp-server: geolocate IP

toolkit_geolocate_ip
Read-onlyIdempotent

Resolve a public IP or dotted hostname to country, region, city, coordinates, ASN, organization, timezone, and proxy/hosting/mobile flags. Supply target for one lookup or targets for an ordered batch, never both; blank target and empty targets are unset. Batches process the first 100 positions (duplicates retained) and disclose every remainder in unprocessedTargets; at most 1000 inputs are accepted. Each batch position reports its result or an error with recovery, so cached and local outcomes survive quota refusals. The provider is called directly, never the target. Hostnames are DNS-resolved and resolvedIp names the located address. Private/reserved addresses have no public geolocation. Results are best-effort, city-level at best; VPNs, proxies, mobile NAT, and anycast defeat IP-to-location. Read proxy, hosting, and mobile before trusting coordinates: true describes infrastructure, not the user. Absent metadata remains unknown. source names the provider. Single and batch quotas are independent; cache hits consume neither quota.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNoOne public IP or dotted hostname; mutually exclusive with nonempty targets.
targetsNoOrdered public IPs or dotted hostnames; first 100 positions are served, every remainder is disclosed. Mutually exclusive with nonblank target.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
asnNoAutonomous System number, e.g. "AS15169". Absent on providers that omit it.
orgNoOwning organization or ISP, e.g. "Google LLC". Absent when unknown.
cityNoCity name. Absent when unknown.
errorNoPresent when the call failed. Absent on success.
proxyNoTrue when the address is a known proxy, VPN, or Tor exit — the location describes the exit node, not the user. Absent when the provider does not report it.
mobileNoTrue when the address belongs to a mobile carrier network, where NAT can place the location far from the device. Absent when unreported.
regionNoRegion or state name. Absent when unknown.
sourceNoThe provider that answered the lookup, e.g. "ip-api".
targetNoThe target as supplied (IP or hostname).
countryNoCountry name. Absent when the provider does not report it.
hostingNoTrue when the address belongs to a hosting or datacenter network, so the location is a facility rather than a person. Absent when unreported.
resultsNoOrdered results or failures for the first 100 input positions.
latitudeNoLatitude in decimal degrees. Absent when unknown.
timezoneNoIANA timezone, e.g. "America/Los_Angeles". Absent when unknown.
longitudeNoLongitude in decimal degrees. Absent when unknown.
resolvedIpNoThe IP that was actually located (a supplied hostname is resolved to this first).
countryCodeNoISO 3166-1 alpha-2 country code. Absent when unknown.
failedCountNoNumber of failed processed targets.
unprocessedTargetsNoEvery input position past the first 100; resubmit these targets in another batch.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changed
    • changedInput schema / properties / target / anyOf
      Previous value: -[
      -  {
      -    "description": "A raw IPv4 address.",
      -    "format": "ipv4",
      -    "pattern": "^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$",
      -    "type": "string"
      -  },
      -  {
      -    "description": "A raw IPv6 address.",
      -    "format": "ipv6",
      -    "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$",
      -    "type": "string"
      -  },
      -  {
      -    "description": "A dotted hostname, e.g. \"example.com\".",
      -    "pattern": "^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$",
      -    "type": "string"
      -  }
      -]New value: +[
      +  {
      +    "description": "Blank means unset.",
      +    "pattern": "^\\s*$",
      +    "type": "string"
      +  },
      +  {
      +    "description": "A raw IPv4 address.",
      +    "format": "ipv4",
      +    "pattern": "^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$",
      +    "type": "string"
      +  },
      +  {
      +    "description": "A raw IPv6 address.",
      +    "format": "ipv6",
      +    "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$",
      +    "type": "string"
      +  },
      +  {
      +    "description": "A dotted hostname, e.g. \"example.com\".",
      +    "pattern": "^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$",
      +    "type": "string"
      +  }
      +]
    • changedInput schema / properties / target / description
      Previous value: -"A public IPv4/IPv6 address or a hostname (e.g. \"8.8.8.8\" or \"example.com\")."New value: +"One public IP or dotted hostname; mutually exclusive with nonempty targets."
    • addedInput schema / properties / targets
      Added value: +{
      +  "description": "Ordered public IPs or dotted hostnames; first 100 positions are served, every remainder is disclosed. Mutually exclusive with nonblank target.",
      +  "items": {
      +    "anyOf": [
      +      {
      +        "description": "A raw IPv4 address.",
      +        "format": "ipv4",
      +        "pattern": "^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$",
      +        "type": "string"
      +      },
      +      {
      +        "description": "A raw IPv6 address.",
      +        "format": "ipv6",
      +        "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$",
      +        "type": "string"
      +      },
      +      {
      +        "description": "A dotted hostname, e.g. \"example.com\".",
      +        "pattern": "^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$",
      +        "type": "string"
      +      }
      +    ],
      +    "description": "A public IPv4/IPv6 address or a hostname (e.g. \"8.8.8.8\" or \"example.com\")."
      +  },
      +  "maxItems": 1000,
      +  "type": "array"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "target"
      -]
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "error"
      -      ]
      -    },
      -    "required": [
      -      "target",
      -      "resolvedIp",
      -      "source"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "error"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    }
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `unresolvable_host`: A hostname target failed DNS resolution. `private_target`: The target resolves to a private/reserved IP with no public geolocation. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `rate_limited`: The endpoint request quota or provider cooldown is exhausted. `unresolvable_host`: A hostname target failed DNS resolution. `private_target`: The target resolves to a private/reserved IP with no public geolocation. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "unresolvable_host",
      -  "private_target"
      -]New value: +[
      +  "rate_limited",
      +  "unresolvable_host",
      +  "private_target"
      +]
    • addedOutput schema / properties / failedCount
      Added value: +{
      +  "description": "Number of failed processed targets.",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / results
      Added value: +{
      +  "description": "Ordered results or failures for the first 100 input positions.",
      +  "items": {
      +    "anyOf": [
      +      {
      +        "additionalProperties": false,
      +        "description": "Normalized geolocation metadata for one target.",
      +        "properties": {
      +          "asn": {
      +            "description": "Autonomous System number, e.g. \"AS15169\". Absent on providers that omit it.",
      +            "maxLength": 256,
      +            "type": "string"
      +          },
      +          "city": {
      +            "description": "City name. Absent when unknown.",
      +            "maxLength": 256,
      +            "type": "string"
      +          },
      +          "country": {
      +            "description": "Country name. Absent when the provider does not report it.",
      +            "maxLength": 256,
      +            "type": "string"
      +          },
      +          "countryCode": {
      +            "description": "ISO 3166-1 alpha-2 country code. Absent when unknown.",
      +            "maxLength": 256,
      +            "type": "string"
      +          },
      +          "hosting": {
      +            "description": "True when the address belongs to a hosting or datacenter network, so the location is a facility rather than a person. Absent when unreported.",
      +            "type": "boolean"
      +          },
      +          "latitude": {
      +            "description": "Latitude in decimal degrees. Absent when unknown.",
      +            "type": "number"
      +          },
      +          "longitude": {
      +            "description": "Longitude in decimal degrees. Absent when unknown.",
      +            "type": "number"
      +          },
      +          "mobile": {
      +            "description": "True when the address belongs to a mobile carrier network, where NAT can place the location far from the device. Absent when unreported.",
      +            "type": "boolean"
      +          },
      +          "org": {
      +            "description": "Owning organization or ISP, e.g. \"Google LLC\". Absent when unknown.",
      +            "maxLength": 256,
      +            "type": "string"
      +          },
      +          "proxy": {
      +            "description": "True when the address is a known proxy, VPN, or Tor exit — the location describes the exit node, not the user. Absent when the provider does not report it.",
      +            "type": "boolean"
      +          },
      +          "region": {
      +            "description": "Region or state name. Absent when unknown.",
      +            "maxLength": 256,
      +            "type": "string"
      +          },
      +          "resolvedIp": {
      +            "description": "The IP that was actually located (a supplied hostname is resolved to this first).",
      +            "type": "string"
      +          },
      +          "source": {
      +            "description": "The provider that answered the lookup, e.g. \"ip-api\".",
      +            "type": "string"
      +          },
      +          "target": {
      +            "description": "The target as supplied (IP or hostname).",
      +            "type": "string"
      +          },
      +          "timezone": {
      +            "description": "IANA timezone, e.g. \"America/Los_Angeles\". Absent when unknown.",
      +            "maxLength": 256,
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "target",
      +          "resolvedIp",
      +          "source"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "additionalProperties": false,
      +        "description": "A failed batch target with recovery guidance.",
      +        "properties": {
      +          "error": {
      +            "additionalProperties": false,
      +            "description": "Failure for this input position.",
      +            "properties": {
      +              "message": {
      +                "description": "Server-authored failure message.",
      +                "type": "string"
      +              },
      +              "reason": {
      +                "description": "Why this target could not be located.",
      +                "enum": [
      +                  "unresolvable_host",
      +                  "private_target",
      +                  "rate_limited",
      +                  "provider_unavailable"
      +                ],
      +                "type": "string"
      +              },
      +              "recovery": {
      +                "additionalProperties": false,
      +                "description": "Recovery guidance for the failed target.",
      +                "properties": {
      +                  "hint": {
      +                    "description": "How to recover this target lookup.",
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "hint"
      +                ],
      +                "type": "object"
      +              },
      +              "waitTimeSeconds": {
      +                "description": "Seconds to wait before retrying a rate-limited target.",
      +                "type": "number"
      +              }
      +            },
      +            "required": [
      +              "reason",
      +              "message",
      +              "recovery"
      +            ],
      +            "type": "object"
      +          },
      +          "target": {
      +            "description": "The failed target as supplied.",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "target",
      +          "error"
      +        ],
      +        "type": "object"
      +      }
      +    ],
      +    "description": "Result or failure for one input position."
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / unprocessedTargets
      Added value: +{
      +  "description": "Every input position past the first 100; resubmit these targets in another batch.",
      +  "items": {
      +    "description": "One unprocessed target.",
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "target",
      +      "resolvedIp",
      +      "source"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `unresolvable_host`: A hostname target failed DNS resolution. `private_target`: The target resolves to a private/reserved IP with no public geolocation. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "unresolvable_host",
      +            "private_target"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "target",
      -  "resolvedIp",
      -  "source"
      -]
  3. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare readOnly/openWorld/idempotent; the description adds substantial behavior the annotations cannot convey: batches serve the first 100 positions (duplicates retained) and disclose the rest in unprocessedTargets, a 1000-input cap, per-position errors with recovery, independent single/batch quotas, cache hits consuming neither quota, and most importantly that the provider is called directly and never the target. It also states that private/reserved addresses have no public geolocation and that absent metadata stays unknown.

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?

A single dense paragraph of roughly nine sentences, but the purpose and input-mode rules are front-loaded and each subsequent sentence carries non-redundant content (limits, quota behavior, accuracy caveats). It would benefit from light structuring, yet almost every sentence earns its place given the tool's complexity.

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?

An output schema exists, so return-value documentation is not required, yet the description still names the fields and explains source/resolvedIp semantics. Combined with quota rules, batch limits, mutual exclusivity, and accuracy caveats, an agent has everything needed to call this correctly and interpret results.

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%, so the two parameters are already fully documented, including mutual exclusivity and the blank-means-unset semantics. The description reinforces those points and adds one detail not in the schema (duplicates retained in a batch), but it adds little syntax or format meaning beyond what the schema provides, so the 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?

Opens with a specific verb+resource ("Resolve a public IP or dotted hostname") and enumerates exactly what is returned: country, region, city, coordinates, ASN, organization, timezone, and proxy/hosting/mobile flags. The sibling tools (generate_qr, hash_value, encode_value, generate_id) are unrelated utilities, so no sibling disambiguation is needed and none is missing.

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?

Gives clear operating rules: use target for one lookup or targets for a batch, never both; blank/empty values are treated as unset. It also supplies interpretation guidance ("Read proxy, hosting, and mobile before trusting coordinates") and warns that VPNs, proxies, mobile NAT, and anycast defeat IP-to-location. No alternative tool exists to route to, so the only gap is the absence of explicit when-not scenarios beyond the accuracy caveats.

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.