Skip to main content
Glama
NimbleBrainInc

IPInfo MCP Server

get_ip_country

Retrieve the two-letter country code for any IP address using IP geolocation. Specify an IP to get its country or omit to identify your current location.

Instructions

Get just the country code for an IP address.

Args: ip: IP address to lookup. If None, returns current country.

Returns: Two-letter country code (ISO-3166).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
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 key behavioral traits: the tool returns a two-letter country code (ISO-3166) and handles a null IP by returning the current country. However, it lacks details on error handling, rate limits, or data sources, which are important for a lookup tool.

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: the first sentence states the purpose clearly, followed by structured 'Args' and 'Returns' sections. Every sentence earns its place, with no redundant or verbose content.

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?

Given the tool's low complexity (1 parameter, no nested objects) and the presence of an output schema (implied by 'Returns' section), the description is mostly complete. It covers purpose, parameter behavior, and return value. However, it could benefit from mentioning error cases or data source limitations 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?

Schema description coverage is 0%, so the description must compensate. It adds meaning beyond the schema by explaining the parameter's purpose ('IP address to lookup') and special behavior ('If None, returns current country'). This covers the single parameter's semantics well, though it could specify format constraints (e.g., IPv4/IPv6).

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: 'Get just the country code for an IP address.' It specifies the verb ('Get'), resource ('country code'), and scope ('for an IP address'), and distinguishes it from siblings like get_ip_city, get_ip_region, and get_ip_info by focusing exclusively on the country code.

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 for usage: 'If None, returns current country.' This indicates when to omit the parameter. However, it does not explicitly state when to use this tool versus alternatives like get_ip_info (which might include country and other details) or batch_lookup (for multiple IPs), leaving some sibling differentiation implicit.

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/NimbleBrainInc/mcp-ipinfo'

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