Skip to main content
Glama

Bgp Prefix Origin

bgp_prefix_origin

Identify the autonomous systems (ASes) originating a BGP prefix, including RPKI status when available. Queries Cloudflare Radar first, falling back to RIPEstat if needed.

Instructions

Find which AS(es) originate a given prefix.

Returns the distinct origin ASN(s) with AS names. Cloudflare Radar (pfx2as) is queried first because it also reports per-origin RPKI status; if it is not configured or returns nothing, RIPEstat routing-status is used (no rpki_status). error is set only when every source failed, so an empty origins with no error means the prefix is genuinely not announced.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prefixYesIP prefix in CIDR notation (e.g. '1.1.1.0/24')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoSet when an upstream lookup failed; other fields may be empty or partial.
sourceNoWhich data source produced this result
originsYesDistinct origin ASes
query_prefixYesPrefix that was queried

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/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 explains the fallback order between two data sources and the meaning of an empty origins list with no error, which is valuable for interpretation. However, it does not explicitly state that the operation is read-only or mention any authentication/rate-limit considerations. The disclosure is good but not exhaustive.

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 two sentences long and front-loads the core purpose. Each sentence adds value: the first states the action and output, the second explains the data source fallback and error handling. There is no redundant or filler text.

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?

For a tool with a single parameter and an output schema, the description covers the essential behavioral aspects (source fallback, error semantics, interpretation of empty results). The return format is presumably documented in the output schema, so the description does not need to repeat it. Nothing critical is missing for an agent to call this tool correctly.

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 already provides a complete description of the only parameter ('prefix' with CIDR notation and an example). The tool description adds no additional parameter-specific details beyond what the schema states. Since schema coverage is 100%, the baseline of 3 applies.

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 function: 'Find which AS(es) originate a given prefix.' It also specifies the output (distinct origin ASN(s) with AS names), which distinguishes it from sibling tools like bgp_route_lookup (which focuses on routes) and rpki_validate (which checks RPKI validity). The purpose is precise and unambiguous.

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 provides context about internal data sources (Cloudflare Radar first, then RIPEstat) and explains error semantics, but it does not explicitly state when to use this tool versus alternatives. It does not name sibling tools or give conditions like 'use this if you need per-origin RPKI status.' The guidance is implicit rather than explicit, so a score of 3 is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.