Skip to main content
Glama

IP address lookup

ip_lookup
Read-only

Find where an IP address is: country, region, city, continent and approximate coordinates, for IPv4 or IPv6. City-level accuracy, not a street address. Data: IP Geolocation by DB-IP (db-ip.com), CC BY 4.0.

$0.002 USDC per call over x402. Failed calls cost nothing. Call without payment to get a quote.

When to use: You need roughly where an IP address is. Parameters: ip: one IPv4 or IPv6 address. Private and reserved addresses are refused free. Returns: country, region, city, continent and approximate latitude/longitude (city level, not a street address).

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

Input Schema

NameRequiredDescriptionDefault
ipYesIPv4 or IPv6 address.
paymentNoBase64 x402 payment payload. Omit it to receive a quote; sign that and call again.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint/openWorldHint annotations: it discloses the $0.002 USDC x402 price, that failed calls are free, that omitting `payment` returns a quote, that private/reserved addresses are refused, and that accuracy is city-level only. That is exactly the cost/auth/limitation context an agent needs before calling.

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?

Front-loaded with purpose and laid out in clear labeled sections (When to use / Parameters / Returns). Minor redundancy: the field list in the opening sentence is repeated almost verbatim in the Returns section.

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?

With no output schema available, the description carries the return-shape burden and does so explicitly, plus pricing, payment handshake, error behavior, and accuracy caveats. Nothing material is missing for a two-parameter lookup tool.

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%, so both `ip` and `payment` are already documented in the schema, and the description's quote-flow sentence largely restates the `payment` schema text. The one added nuance is that private/reserved IPs are rejected free, which is marginal over the schema baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — 'Find where an IP address is' — and enumerates the returned fields (country, region, city, continent, coordinates). It implicitly separates itself from geocode_address by working IP→location rather than address→coordinates, but never names that sibling, so differentiation is left to inference.

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?

'When to use: You need roughly where an IP address is' gives a clear triggering condition, and the note that private/reserved addresses are refused free sets a boundary. No explicit when-not or named alternative (e.g., geocode_address for street-level needs) is provided.

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.