Skip to main content
Glama
badchars

osint-mcp-server

by badchars

bgp_ip

Look up BGP routing information for any IP address to identify matching prefixes, ASNs, and RIR allocation data.

Instructions

Look up BGP routing information for an IP address. Returns matching prefixes, ASNs, and RIR allocation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipYesIP address to look up

Implementation Reference

  • The actual implementation (handler) of the `bgp_ip` tool.
    export async function bgpIp(ip: string): Promise<BgpIpResult> {
      const key = `ip:${ip}`;
      const cached = cache.get(key);
      if (cached) return cached;
    
      const data = await bgpFetch(`/ip/${ip}`);
    
      const result: BgpIpResult = {
        ip,
        prefixes: (data.prefixes ?? []).map((p: any) => ({
          prefix: p.prefix, asn: p.asn?.asn, name: p.name, description: p.description, countryCode: p.country_code,
        })),
        rir: data.rir_allocation?.rir_name ?? "",
      };
    
      cache.set(key, result);
      return result;
    }
  • Type definition for the BGP IP lookup result.
    interface BgpIpResult {
      ip: string;
      prefixes: { prefix: string; asn: number; name: string; description: string; countryCode: string }[];
      rir: string;
    }
  • Tool definition and registration for `bgp_ip`.
    const bgpIpTool: ToolDef = {
      name: "bgp_ip",
      description: "Look up BGP routing information for an IP address. Returns matching prefixes, ASNs, and RIR allocation.",
      schema: {
        ip: z.string().describe("IP address to look up"),
      },
      execute: async (args) => json(await bgpIp(args.ip as string)),
    };
Behavior2/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 mentions what data is returned (prefixes, ASNs, RIR allocation) but lacks details on rate limits, authentication needs, error conditions, or whether this is a read-only operation. For a tool with zero annotation coverage, this is a significant gap.

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 a single, well-structured sentence that efficiently communicates the tool's function and return values without any wasted words. It's appropriately sized and front-loaded with the core purpose.

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 simple single-parameter input schema and no output schema, the description provides basic completeness by stating what data is returned. However, it lacks details on output format, pagination, or error handling, which would be helpful for an agent to use this tool effectively.

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 the 'ip' parameter clearly documented. The description doesn't add any additional parameter semantics beyond what's in the schema, such as format requirements or examples, so it meets the baseline for high schema coverage.

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 ('BGP routing information for an IP address'), and it distinguishes from siblings like bgp_asn and bgp_prefix by focusing on IP-based lookups rather than ASN or prefix queries.

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

Usage Guidelines3/5

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

The description implies usage for IP-based BGP lookups, but it doesn't explicitly state when to use this tool versus alternatives like vt_ip, geoip_lookup, or other IP-related tools in the sibling list. No exclusions or clear alternatives are provided.

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