Skip to main content
Glama
IPGeolocation

IP Geolocation MCP Server

ASN Details

lookup_asn
Read-only

Retrieve comprehensive ASN information including peers, downstreams, upstreams, route prefixes, and WHOIS data by querying an AS number or IP address.

Instructions

Read-only ASN enrichment via GET /v3/asn. Paid only. Cost: 1 credit. Query by asn or ip; asn takes priority over ip. Use for ASN relationships, route prefixes, allocation details, or WHOIS; use lookup_ip for basic ASN with geolocation.

Returns { asn } core fields plus included peers, downstreams, upstreams, routes, or whois_response. include accepts those five values. fields/excludes accept full asn.* paths or root-relative paths such as upstreams.as_number. force_refresh bypasses cache only when the user asks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipNoIPv4 or IPv6 address to find the ASN for. Used only if asn is not provided.
asnNoAS number to look up (e.g. AS13335 or just 13335). Takes priority over ip if both are provided.
fieldsNoComma-separated dot-path fields to return (e.g. asn.as_number,asn.organization or upstreams.as_number). Paths can be full (asn.upstreams.as_number) or relative to the asn root (upstreams.as_number). Use include for optional datasets (peers/downstreams/upstreams/routes/whois_response), then use fields to keep only required paths.
includeNoComma-separated extra data to include: peers, downstreams, upstreams, routes, whois_response. No additional credit cost.
excludesNoComma-separated dot-path fields to exclude (e.g. asn.date_allocated,asn.rir or upstreams.description). Paths can be full or relative to the asn root.
force_refreshNoDefault false. Set true only when the user asks to refresh cached ASN data; a successful refresh makes a new upstream request and can consume credits.
Behavior5/5

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

Beyond annotations (readOnlyHint), description discloses credit cost, cache behavior, and parameter priority. 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.

Conciseness5/5

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

Concise, front-loaded with critical info (read-only, paid, credit), and each sentence adds value without redundancy.

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?

Covers usage, all parameters, return structure, and shaping output. Adequate for a tool with no output schema and 6 parameters.

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?

Adds meaning beyond schema by explaining priority, fields/excludes path syntax, include values with no extra cost, and force_refresh condition. Schema coverage is 100% but description enriches understanding.

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 is an ASN enrichment tool using GET /v3/asn, distinguishes from lookup_ip for basic ASN with geolocation, and specifies query methods (ASN or IP).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit usage guidance includes paid nature, credit cost, priority of asn over ip, alternative tool recommendation (lookup_ip), and correct use of force_refresh.

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/IPGeolocation/ipgeolocation-io-mcp'

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