Skip to main content
Glama

ip_lookup

Retrieve geolocation data for any IP address, including city, region, country, coordinates, timezone, and EU status. Use 'auto:ip' to locate your own IP address.

Instructions

Look up geolocation data for an IP address: city, region, country, coordinates, timezone, and whether it's in the EU. Pass 'auto:ip' to geolocate the caller's own IP address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesIPv4 address, IPv6 address, or 'auto:ip' for caller's IP.

Implementation Reference

  • The handler logic for 'ip_lookup' which calls the 'weatherRequest' function with the '/ip.json' endpoint.
    case "ip_lookup": {
      const { q } = args as { q: string };
      result = await weatherRequest("/ip.json", { q });
      break;
    }
  • The tool definition and input schema for 'ip_lookup'.
    {
      name: "ip_lookup",
      description:
        "Look up geolocation data for an IP address: city, region, country, coordinates, timezone, and whether it's in the EU. Pass 'auto:ip' to geolocate the caller's own IP address.",
      inputSchema: {
        type: "object",
        properties: {
          q: {
            type: "string",
            description: "IPv4 address, IPv6 address, or 'auto:ip' for caller's IP.",
          },
        },
        required: ["q"],
      },
    },

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/weatherapicom/weatherapi-mcp'

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