Skip to main content
Glama

toolkit-mcp-server: geolocate IP

toolkit_geolocate_ip
Read-onlyIdempotent

Resolve a public IP address or hostname to geographic and network metadata, including country, region, city, coordinates, ASN, and timezone. Safe to expose as it queries the provider directly, avoiding SSRF risks.

Instructions

Resolve a public IP address (or hostname) to geographic and network metadata: country, region, city, latitude/longitude, the owning ASN and organization, and timezone. target accepts an IPv4/IPv6 address or a hostname — a hostname is DNS-resolved first and the resolvedIp field echoes which IP was actually located. The provider is called directly (never the target), so this is SSRF-free and safe to expose anywhere. Results are best-effort and provider-bounded: VPNs, proxies, mobile NAT, and anycast all defeat IP-to-location, accuracy is city-level at best, and many fields can be absent for reserved or thinly-documented ranges — absent fields are reported as unknown, never invented. Private/reserved addresses have no public geolocation and are rejected. The source field names which provider answered.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYesA public IPv4/IPv6 address or a hostname (e.g. "8.8.8.8" or "example.com").

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.
regionNoRegion or state name. Absent when unknown.
sourceYesThe provider that answered the lookup, e.g. "ip-api".
targetYesThe target as supplied (IP or hostname).
countryNoCountry name. Absent when the provider does not report it.
latitudeNoLatitude in decimal degrees. Absent when unknown.
timezoneNoIANA timezone, e.g. "America/Los_Angeles". Absent when unknown.
longitudeNoLongitude in decimal degrees. Absent when unknown.
resolvedIpYesThe IP that was actually located (a supplied hostname is resolved to this first).
countryCodeNoISO 3166-1 alpha-2 country code. Absent when unknown.
Behavior5/5

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

Annotations indicate read-only, open-world, idempotent. Description adds critical behavioral traits: SSRF-free (direct provider call), best-effort accuracy, absent fields reported as unknown, private addresses rejected. No contradiction with annotations.

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 description is a single, clear paragraph that covers all necessary information without redundancy. Slightly dense but efficient; no wasted words.

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?

Given the simple parameter set (1 required, no enums, good annotations, and existence of output schema), the description provides all needed context: input formats, behavioral caveats, and result semantics. It is complete.

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

Parameters5/5

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

Schema coverage is 100% with the single 'target' parameter well-described. Description adds that hostnames are DNS-resolved first and the 'resolvedIp' field echoes the actual IP used, which is not in the schema.

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 clearly states it resolves public IPs/hostnames to geographic and network metadata, listing fields like country, region, city, lat/lng, ASN, org, timezone. It is distinct from siblings (encoding, hashing, ID generation).

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?

The description explains what the tool does but does not explicitly state when to use vs alternatives. However, it provides usage context by noting limitations (VPNs, proxies, etc.), which helps the agent decide appropriateness.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyanheads/toolkit-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server