Skip to main content
Glama

Draw a network diagram

pwhois_map
Read-onlyIdempotent

Draw a network diagram / show the BGP path for an IP address, prefix or ASN: providers on the left, the network in the middle, downstream networks and prefixes on the right, enriched by Prefix WhoIs. Use for requests like 'draw a network diagram of AS15169', 'show me the BGP path to 8.8.8.8', 'display the network path for 2001:4860::/32'. Also for 'show me a network diagram' and 'map this ASN'. Returns the chart as a PNG image block (format=svg: no image block), a summary with a hosted image link, the interactive map link and a link that reproduces this exact look, an ARTIFACT_HTML text block (a self-contained page with the chart as SVG), and the counts in structuredContent. Clients differ. claude.ai chat and Claude Cowork do not display tool images: publish the ARTIFACT_HTML block as an HTML artifact, verbatim, then give the links. Claude Code receives the PNG as a saved file ('[Image: source: ]'): show that file to the user with the client's file tool (e.g. SendUserFile) or publish the ARTIFACT_HTML as an artifact. API clients that render image blocks need nothing more. Give the user both links and the attribution. Costs 5 queries per chart. Method: see pwhois.org/maps/credits.who#methodology.

Input Schema

NameRequiredDescriptionDefault
fontNoLabel font. Default Nunito Sans.
queryYesWhat to draw: an IPv4/IPv6 address, a CIDR prefix, or an AS number (AS15169 or 15169). A hostname is resolved to its address first.
widthNoImage width in pixels.
familyNoAddress family to draw for an AS. An address or prefix sets its own.
formatNoImage format: PNG by default; svg on request. If the server cannot make a PNG right now, the SVG is returned with a note.png
presetNoColours: nightwire (violet on near-black), phosphor (teal glow), ember (amber and coral), paper (light, for documents and print), mono (grayscale).nightwire
collectorsNoAlso draw the networks whose sessions feed pWhois's route collectors (vantage points). Off by default: they show where routes are observed from, not who the network connects to.
downstreamNoFor an AS: also draw the networks behind it (direct downstream customers and their prefixes, bounded). Ignored for addresses and prefixes.

Output Schema

NameRequiredDescriptionDefault
costYesQueries charged for this chart.
kindYes
noteNo
bytesNoSize of the PNG image block (0 when there is none).
edgesYes
emptyNo
nodesYesNodes drawn (networks, prefixes, addresses, bundles).
queryYesThe focus in normal form: AS15169, 8.8.8.8, 8.8.8.0/24.
widthNo
cachedNo
familyYes
formatYespng: a PNG image block leads the answer; svg: no image block, the chart is the SVG inside the ARTIFACT_HTML block; none: nothing routed, nothing drawn.
heightNo
png_fitNooriginal | quantized | scaled:<width> (how the PNG was fitted under the size limit).
sampledYesTrue when a size cap cut the routing data (large networks).
networksNo
warningsNoWhat the drawing left out or shrank (e.g. "drawn counts reduced to keep labels legible at 1200 px"); the full data is on the interactive map.
allowanceNoDaily allowance after this call.
image_urlNoHosted PNG of this chart (https://pwhois.org/maps/<id>.png); null if the look could not be stored.
permalinkYesInteractive map of the same focus on pwhois.org.
share_urlNoInteractive map with this exact look (preset, font, layout); null if it could not be stored.
svg_bytesNo
collectorsNoWhether the collector vantage points were drawn.
downstreamNoFor an AS with downstream=true: the networks behind it.
queried_asNoThe hostname you passed, when it was resolved.
rasterizerNoWhat converted the drawing to PNG.
attributionNo
artifact_bytesNo
collector_peersNoHow many networks feed the route collectors with this network's routes (always counted, drawn only with collectors=true).
artifact_includedNoWhether the ARTIFACT_HTML text block is in the answer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedOutput schema / properties / artifact_bytes
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / artifact_included
      Added value: +{
      +  "description": "Whether the ARTIFACT_HTML text block is in the answer.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / bytes
      Added value: +{
      +  "description": "Size of the PNG image block (0 when there is none).",
      +  "type": "integer"
      +}
    • changedOutput schema / properties / format / description
      Previous value: -"What the image block holds. none: nothing routed, nothing drawn."New value: +"png: a PNG image block leads the answer; svg: no image block, the chart is the SVG inside the ARTIFACT_HTML block; none: nothing routed, nothing drawn."
    • addedOutput schema / properties / image_url
      Added value: +{
      +  "description": "Hosted PNG of this chart (https://pwhois.org/maps/<id>.png); null if the look could not be stored.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / png_fit
      Added value: +{
      +  "description": "original | quantized | scaled:<width> (how the PNG was fitted under the size limit).",
      +  "type": "string"
      +}
    • addedOutput schema / properties / svg_bytes
      Added value: +{
      +  "type": "integer"
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / collectors
      Added value: +{
      +  "default": false,
      +  "description": "Also draw the networks whose sessions feed pWhois's route collectors (vantage points). Off by default: they show where routes are observed from, not who the network connects to.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / collector_peers
      Added value: +{
      +  "description": "How many networks feed the route collectors with this network's routes (always counted, drawn only with collectors=true).",
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / collectors
      Added value: +{
      +  "description": "Whether the collector vantage points were drawn.",
      +  "type": "boolean"
      +}
  3. Added

TDQS

A4.6/5.0
Behavior5/5

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

With readOnlyHint/openWorldHint/idempotentHint already covering the safety profile, the description goes well beyond them: it discloses the cost (5 queries per chart), the side effect of format=svg (no image block), the full set of returned blocks (PNG, ARTIFACT_HTML, structuredContent counts), and client-specific display behavior for claude.ai, Claude Cowork, Claude Code, and API clients. This is exactly the extra context annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

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

Front-loaded with purpose and examples, then return-shape and per-client handling, so the important routing information comes first. It is long and the client-guidance sentences are dense, but nearly every sentence carries actionable information; only the link/attribution instructions are slightly procedural noise for a selection decision.

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 an 8-parameter tool with an output schema, this covers everything an agent needs: what it draws, what it returns, which clients need which post-processing step, the quota cost, and where the methodology is documented. Nothing required to invoke or correctly present the result is missing.

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 coverage is 100%, so baseline is 3, but the description adds genuine meaning: format=svg suppresses the image block and falls back to SVG if PNG generation fails, and the accepted query forms (AS15169 or 15169, hostname resolution) supplement the schema examples. It does not explain preset/font/width semantics beyond the schema, keeping it at 4 rather than 5.

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 first sentence names a specific verb (draw/show) and resource (network diagram / BGP path) and defines the visual layout (providers left, network middle, downstream right). Concrete example queries ('draw a network diagram of AS15169', 'show me the BGP path to 8.8.8.8') let an agent match this against sibling tools like pwhois_asn_transit or pwhois_lookup_ip without opening either schema.

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?

Provides explicit trigger phrasings and enumerates the accepted query forms (IP, prefix, ASN), which is strong usage context. It does not, however, state when NOT to use this tool in favor of a cheaper sibling (e.g. pwhois_lookup_ip for a plain lookup), and the 5-query cost is mentioned only as a fact rather than as a routing criterion.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources