Skip to main content
Glama
badchars

osint-mcp-server

by badchars

geoip_lookup

Geolocate IP addresses to identify country, city, ISP, ASN, and detect proxy/hosting/mobile connections for reconnaissance and analysis.

Instructions

Geolocate an IP address: country, city, ISP, ASN, proxy/hosting/mobile detection. Uses ip-api.com (free, no API key).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipYesIP address to geolocate

Implementation Reference

  • The actual implementation of the geoip_lookup tool which fetches data from ip-api.com.
    export async function geoipLookup(ip: string): Promise<GeoIpResult> {
      await limiter.acquire();
      // ip-api.com free tier requires HTTP (not HTTPS)
      const res = await fetch(`http://ip-api.com/json/${encodeURIComponent(ip)}?fields=status,message,query,country,countryCode,region,regionName,city,zip,lat,lon,timezone,isp,org,as,asname,mobile,proxy,hosting`);
      if (!res.ok) throw new Error(`ip-api.com returned ${res.status}`);
      const data = await res.json();
      if (data.status === "fail") throw new Error(`ip-api.com: ${data.message}`);
      return data;
    }
  • Tool definition and registration for geoip_lookup.
    const geoipLookupTool: ToolDef = {
      name: "geoip_lookup",
      description: "Geolocate an IP address: country, city, ISP, ASN, proxy/hosting/mobile detection. Uses ip-api.com (free, no API key).",
      schema: {
        ip: z.string().describe("IP address to geolocate"),
      },
      execute: async (args) => json(await geoipLookup(args.ip as string)),
    };
  • Type definition for the GeoIP lookup result.
    interface GeoIpResult {
      query: string;
      status: string;
      country?: string;
      countryCode?: string;
      region?: string;
      regionName?: string;
      city?: string;
      zip?: string;
      lat?: number;
      lon?: number;
      timezone?: string;
      isp?: string;
      org?: string;
      as?: string;
      asname?: string;
      mobile?: boolean;
      proxy?: boolean;
      hosting?: boolean;
    }
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It successfully describes key behavioral traits: the specific data returned (country, city, ISP, etc.), the external service used (ip-api.com), and operational details (free, no API key). It doesn't mention rate limits, error conditions, or response format, but provides substantial context beyond basic functionality.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly concise and front-loaded: a single sentence communicates the core functionality, returned data, service source, and operational details with zero wasted words. Every element earns its place by providing essential information.

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

Completeness4/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 annotations and no output schema, the description provides excellent coverage of what the tool does, what data it returns, and how it operates. The main gap is the lack of output format details (structure of returned data), but otherwise it's quite complete given the tool's simplicity.

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?

The input schema has 100% description coverage with a clear parameter description for 'ip'. The description adds no additional parameter information beyond what's in the schema, which is acceptable given the high schema coverage. The baseline score of 3 reflects adequate but minimal added value for parameters.

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 the specific action ('Geolocate an IP address') and lists the detailed information returned (country, city, ISP, ASN, proxy/hosting/mobile detection), which distinguishes it from sibling tools like bgp_asn, dns_lookup, or whois_ip that perform different network-related functions.

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 provides clear context by specifying the data source (ip-api.com) and noting it's free with no API key required, which helps determine when to use this tool. However, it doesn't explicitly state when to choose geoip_lookup versus alternatives like geoip_batch (a sibling tool) or other IP analysis tools in the list.

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/badchars/osint-mcp-server'

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