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"],
      },
    },
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool returns geolocation data and supports 'auto:ip' for self-geolocation, but it lacks details on behavioral traits like rate limits, authentication needs, error handling, or data freshness. The description does not contradict any annotations, but it could be more informative.

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 appropriately sized and front-loaded, with two concise sentences that directly state the tool's purpose and parameter usage. Every sentence adds essential information without redundancy, making it efficient and easy to understand.

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

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (single parameter, no output schema, no annotations), the description is somewhat complete but has gaps. It explains what the tool does and parameter usage but lacks details on output format, error cases, or limitations. Without an output schema, more information on return values would be helpful for full completeness.

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?

The input schema has 100% description coverage, so the baseline is 3. The description adds value by explaining the semantics of the 'q' parameter beyond the schema: it clarifies that 'auto:ip' geolocates the caller's own IP, which is not obvious from the schema alone. This enhances understanding but doesn't fully compensate for missing output details.

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 tool's purpose with a specific verb ('Look up') and resource ('geolocation data for an IP address'), and it distinguishes itself from siblings by focusing on IP geolocation rather than weather, time, sports, or other location-based queries. The inclusion of specific data fields (city, region, etc.) further clarifies its function.

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 on when to use this tool by specifying it's for IP geolocation and mentioning the 'auto:ip' option for the caller's own IP. However, it does not explicitly state when not to use it or name alternatives among siblings, such as using other tools for non-IP-based location data.

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

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