Skip to main content
Glama

Agent Data Tools: Utilities

IP geolocation: city, region, country and coordinates

ip_geolocate
Read-only

Geolocate an IPv4 or IPv6 address to its city, region, country (code and name), continent and approximate latitude and longitude, with the range the record covers, from DB-IP's City Lite data (CC BY 4.0, monthly; attributed in every answer). An HTTP call without ip answers for the caller's own address. City level at best; private addresses are refused. Use to localise a visitor or caller, or enrich logs; for the network owner use ip_lookup. Example: ip=8.8.8.8. Price $0.01/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ip_geolocate"
  }
}

Input Schema

NameRequiredDescriptionDefault
ipNoPublic IPv4 or IPv6 address (over HTTP, left out: the caller's own address)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / ip / description
      Previous value: -"Public IPv4 or IPv6 address"New value: +"Public IPv4 or IPv6 address (over HTTP, left out: the caller's own address)"
    • removedInput schema / required
      Removed value: -[
      -  "ip"
      -]
  2. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already establish read-only, non-destructive, open-world, non-idempotent behaviour, but the description adds genuinely new context: DB-IP City Lite provenance with CC BY 4.0 attribution in every answer, monthly refresh, city-level accuracy ceiling, refusal of private addresses, and per-call billing with failed calls free. The 'each call is charged, so repeats are not free' line even explains the idempotentHint=false annotation rather than contradicting it. Minor gap: no detail on rate limiting or error shapes for refused inputs.

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 returned fields are front-loaded in the first clause, and nearly every sentence carries operational information. The closing stretch is dense — pricing, licensing, idempotency and examples are packed into two run-on sentences, which slightly hurts scannability but not correctness.

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 single-parameter tool with no output schema, the description covers everything needed: return fields, data source and freshness, precision limits, input rejection rules, default behaviour, cost, and the sibling alternative. An agent can decide and call correctly from the description alone.

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?

Only one optional parameter with 100% schema coverage, so the baseline is 3; the description adds value with a concrete example (ip=8.8.8.8) and the explicit consequence of omission, which the schema states only briefly. It could have said more about IPv6 formatting or whether a bare IPv4 literal without the key is accepted.

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?

States a specific verb (geolocate) and resource (IPv4/IPv6 address) and enumerates exactly what comes back: city, region, country code and name, continent, coordinates, and the covered range. It also names the sibling it is not for ('for the network owner use ip_lookup'), so an agent can separate it from ip_lookup/ip_info without opening another schema.

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?

Gives explicit use cases (localise a visitor or caller, enrich logs), an explicit alternative with its condition (ip_lookup for network owner), a hard exclusion (private addresses are refused), and the omitted-parameter behaviour (an HTTP call without ip answers for the caller's own address). Nothing about when-to-use vs when-not is left to inference.

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