Menu

MCP: stats

Traffic statistics of the user's sites

Toolsetstats (opt-in)
Tools9
Permissions granted by weird mcp setupstats:read, stats:write
With --read-onlystats:read
Turn it onweird mcp setup --add stats

weird_stats_sites#

Sites with traffic. List every hostname, pin, content and IPNS name of the user requested in a range of UTC days (default the last 30), with requests, traffic and whether detailed statistics are on. Small credit charge per successful request (charge key ipfs.reads per_request in weird_credits_charges); failed calls are free. Nothing in it describes a visitor.

Changes somethingno (read-only)
Needs confirmed: trueno
Costa small credit charge per successful request (failed calls are free)
CallslistIpfsStatsSubjects

Arguments:

  • from, string — the first UTC day, YYYY-MM-DD
  • to, string — the last UTC day, YYYY-MM-DD (default today)

weird_stats_summary#

Daily traffic summary. Show a site's daily summary: per UTC day requests, those served, traffic, cache share, status classes (exactly 404 and 451 too), requests per UTC hour, and totals. Small credit charge per successful request (charge key ipfs.reads per_request in weird_credits_charges); failed calls are free. Built from gateway log lines (host, path, status, size, cache tier, hour), with no visitor data; the bill, not these counts, is authoritative.

Changes somethingno (read-only)
Needs confirmed: trueno
Costa small credit charge per successful request (failed calls are free)
CallsgetIpfsStatsSummary

Arguments:

  • from, string — the first UTC day, YYYY-MM-DD
  • subject, string, required — a hostname of the user, a pin id, a CID or the key of one of their IPNS names (any subject of weird_stats_sites)
  • to, string — the last UTC day, YYYY-MM-DD (default today)

weird_stats_today#

Today's traffic so far. Show a site's requests, traffic and status classes so far today (UTC), updated within minutes; the full day, with hours and pages, follows in the summary after it ends. Small credit charge per successful request (charge key ipfs.reads per_request in weird_credits_charges); failed calls are free.

Changes somethingno (read-only)
Needs confirmed: trueno
Costa small credit charge per successful request (failed calls are free)
CallsgetIpfsStatsToday

Arguments:

  • subject, string, required — a hostname of the user, a pin id, a CID or the key of one of their IPNS names (any subject of weird_stats_sites)

weird_stats_pages#

Top or missing pages. List a site's most requested pages on one UTC day (default yesterday), or with missing true its not-found pages, the broken links to fix. Small credit charge per successful request (charge key ipfs.reads per_request in weird_credits_charges); failed calls are free. Paths come without query strings; error is a count's possible excess.

Changes somethingno (read-only)
Needs confirmed: trueno
Costa small credit charge per successful request (failed calls are free)
CallsgetIpfsStatsPaths

Arguments:

  • day, string — a UTC day, YYYY-MM-DD (default yesterday)
  • missing, boolean — true: the pages answered not found instead of the top pages
  • subject, string, required — a hostname of the user, a pin id, a CID or the key of one of their IPNS names (any subject of weird_stats_sites)

weird_stats_detail#

Detailed statistics. Show a hostname's detailed statistics: visitors, visits, crawlers, fast clients per UTC day; top referrers, countries, browsers, devices, pages. Small credit charge per successful request (charge key ipfs.reads per_request in weird_credits_charges); failed calls are free. visitors_sum adds daily counts, not unique people; name geo with the countries. Kept: per-day visitor counts under a key new each day and per site (not linked across days or sites), visits, referring hosts, countries, browsers, devices, pages. Not kept: visitor IP addresses and browser strings, only counted on the gateway, gone within 48 hours at most. No cookie or script is added; Global Privacy Control requests stay out.

Changes somethingno (read-only)
Needs confirmed: trueno
Costa small credit charge per successful request (failed calls are free)
CallsgetIpfsStatsDetail

Arguments:

  • dimensions, string — a comma list of referrers, countries, browsers, os, devices, entry_pages, not_found (default all)
  • from, string — the first UTC day, YYYY-MM-DD
  • subject, string, required — one of the user's hostnames with detailed statistics on
  • to, string — the last UTC day, YYYY-MM-DD (default today)

weird_stats_settings#

Detailed statistics settings. List the user's hostnames with their domain_id and detailed-statistics state, whether that level is offered now, and which controller terms the user accepted. Small credit charge per successful request (charge key ipfs.reads per_request in weird_credits_charges); failed calls are free. paused unpaid: collection waits until the credits cover the hours. dpa_paused: sites switched off because a new data processing agreement took effect and the user has not accepted it; they start again once the user runs weird legal accept-dpa.

Changes somethingno (read-only)
Needs confirmed: trueno
Costa small credit charge per successful request (failed calls are free)
CallsgetIpfsStatsSettings

No arguments.

weird_stats_export#

Export statistics to a file. Save a site's statistics over a range of UTC days to a new file on this computer, CSV or JSON, the summary or the detailed level; it answers the path, size and checksum, not the content. Small credit charge per successful request (charge key ipfs.reads per_request in weird_credits_charges); failed calls are free. CSV cells that a spreadsheet could run as formulas are quoted.

Changes somethingyes
Needs confirmed: trueno
Costa small credit charge per successful request (failed calls are free)
CallsexportIpfsStats

Arguments:

  • format, string — csv (default) or json
  • from, string — the first UTC day, YYYY-MM-DD
  • level, string — summary (default) or detail
  • path, string, required — an absolute path for the new file (never overwritten)
  • subject, string, required — a hostname of the user, a pin id, a CID or the key of one of their IPNS names (any subject of weird_stats_sites)
  • to, string — the last UTC day, YYYY-MM-DD (default today)

weird_stats_detail_on#

Switch detailed statistics on. Switch detailed statistics on for one of the user's hostnames (domain_id from weird_stats_settings); only its owner can. COSTS CREDITS: ipfs.stats-detailed-enable now, then BILLS HOURLY ipfs.stats-detailed-hourly per site while on (quote both from weird_credits_charges); a site on already costs nothing. Tell the user what is kept and not (the terms answer says it). A legal act of the user (controller of visitors' data; agreement: weird legal show dpa), due first and on a new text: a call without the fields then answers the terms; show them verbatim, pass controller_terms_acknowledged and acknowledgement_version only if the user accepts. stats:write only via weird mcp setup --add stats.

Changes somethingyes
Needs confirmed: trueyes (costs credits)
Acknowledgementthe person's own, for enableIpfsDomainStatsDetail: call without it to get the text
Call firstweird_stats_settings
The person runsweird mcp setup --add stats
CallsenableIpfsDomainStatsDetail

Arguments:

  • acknowledgement_version, string — required with the field above: the version of the text the user accepted, exactly as this tool returned it
  • confirmed, boolean, required — must be true, and only after the user explicitly agreed to this action and its cost or consequence
  • controller_terms_acknowledged, boolean — required to switch detailed statistics on: true only when the user read and accepted the acknowledgement text (they are the controller of their visitors' data, weird processes it for them). Never set it on your own
  • domain_id, string, required — the hostname's domain_id, from weird_stats_settings
  • idempotency_key, string — optional, for an action that costs credits: pass the same value again if you retry this exact action; a repeat never creates or bills a second one. Leave it out the first time: the answer returns the key used

weird_stats_detail_off#

Switch detailed statistics off. Switch detailed statistics off for one of the user's hostnames (domain_id from weird_stats_settings): collection and the hourly charge stop immediately. Free. Collected statistics stay readable and exportable; allowed even on a restricted or unpaid account.

Changes somethingyes
Needs confirmed: trueyes (consequential)
Call firstweird_stats_settings
CallsdisableIpfsDomainStatsDetail

Arguments:

  • confirmed, boolean, required — must be true, and only after the user explicitly agreed to this action and its cost or consequence
  • domain_id, string, required — the hostname's domain_id, from weird_stats_settings
  • idempotency_key, string — optional, for an action that costs credits: pass the same value again if you retry this exact action; a repeat never creates or bills a second one. Leave it out the first time: the answer returns the key used

This page is generated from the weird CLI; it changes when the CLI does.