Scrutica
src/lib/query-engine/tools.ts at build time, so it stays in sync with the surface the engine actually calls. Per tool: name, description, parameter schema (with enums), and the underlying data layer the executor wraps.think2 paramsUse this tool FIRST to plan your query strategy before calling any data tool. Reason about which tools to call, in what order, and why. Identify if tools can run in parallel (no dependencies) or must be sequential (one tool needs another's output).
| name | type | required | description |
|---|---|---|---|
reasoning | string | yes | Step-by-step reasoning about how to answer this query |
plan | array<object> | yes | Ordered list of tool calls to make |
search_facilities11 paramsSearch and filter compute infrastructure facilities (data centers, semiconductor fabs, packaging plants, HPC centers). Returns facility details including power capacity, GPU count, owner, status, and location.
| name | type | required | description |
|---|---|---|---|
query | string | no | Free-text search on facility name |
country | string | no | ISO 2-letter country code (e.g., US, CN, TW, DE) |
facility_type | string | no | Filter by facility typehyperscale_dccolocationedgelogic_fabmemory_fabpackaginghpc_centerai_training |
status | string | no | Filter by facility statusannouncedpermittedunder_constructionoperationalexpandingdecommissioned |
owner_org_ids | array<string> | no | Filter by owner organization IDs (use output from a previous tool) |
owner_org_name | string | no | Filter by owner organization name (fuzzy matched) |
min_power_mw | number | no | Minimum power capacity in MW |
max_power_mw | number | no | Maximum power capacity in MW |
min_gpu_count | number | no | Minimum total GPU count |
sort_by | string | no | Sort field (default: power_capacity_mw descending)power_capacity_mwtotal_gpu_countpeak_pflops_fp16name |
limit | number | no | Max results to return (default 25, max 100) |
get_facility_details1 paramGet complete details for a specific facility including all relationships, investments, nearby facilities, supply chain connections through owner org, and compute capacity timeline. Use when you need the full picture of a single facility.
| name | type | required | description |
|---|---|---|---|
facility_id | string | yes | The facility ID |
get_nearby_facilities3 paramsFind facilities within a radius of a geographic point. Useful for geographic clustering analysis or finding what infrastructure exists near a specific facility.
| name | type | required | description |
|---|---|---|---|
lat | number | yes | Latitude |
lng | number | yes | Longitude |
radius_km | number | no | Search radius in km (default 50, max 500) |
search_organizations4 paramsSearch for organizations (companies, governments, labs) in the AI compute ecosystem. Returns org profile including financials, type, country HQ, and description. Supports fuzzy name matching via aliases.
| name | type | required | description |
|---|---|---|---|
query | string | no | Free-text search on name (fuzzy matched via aliases) |
org_type | string | no | Filter by organization typechip_designerfab_operatorequipment_makercloud_providerai_labcolocation_providergovernmentinvestorepcpower_provider |
country_hq | string | no | Filter by HQ country (ISO 2-letter) |
limit | number | no | Max results (default 25) |
get_org_profile2 paramsGet a complete organization profile: financials (revenue, capex, market cap), facility portfolio (count, total power, total GPUs), supply chain summary (top suppliers, top customers), and investment history. For deep dives on a single company.
| name | type | required | description |
|---|---|---|---|
org_id | string | no | Organization ID (if known from previous tool results) |
org_name | string | no | Organization name (fuzzy matched if ID unknown) |
get_league_table3 paramsGet ranked list of organizations by a metric. For competitive landscape analysis and identifying the biggest players.
| name | type | required | description |
|---|---|---|---|
rank_by | string | yes | Metric to rank byfacility_counttotal_gpu_counttotal_power_mw |
org_type | string | no | Filter by org type (optional) |
limit | number | no | Top N (default 20) |
get_org_supply_chain4 paramsGet upstream suppliers and/or downstream customers for an organization. Returns supply chain links with product/service, criticality score (1-10), value, sole-source status, and alternative suppliers.
| name | type | required | description |
|---|---|---|---|
org_id | string | no | Organization ID (if known) |
org_name | string | no | Organization name (fuzzy matched) |
direction | string | no | Supply chain direction (default: both)upstreamdownstreamboth |
category | string | no | Filter by supply chain categorysemiconductor_equipmentfoundry_servicesadvanced_packagingmemorysubstratesgpu_acceleratornetworkingpower_deliveryconstructioncoolingraw_materialssoftware_ip |
get_chokepoint_analysis2 paramsIdentify supply chain chokepoints: organizations that are sole-source suppliers in critical categories, have high criticality scores, or serve many customers with no alternatives. Essential for supply chain risk and exposure analysis.
| name | type | required | description |
|---|---|---|---|
category | string | no | Filter by supply chain category |
min_criticality | number | no | Minimum criticality score (1-10) |
get_country_interdependence1 paramAnalyze a country's dependency on foreign suppliers in the AI compute supply chain. Returns total links, foreign dependency percentage, sole-source foreign dependencies, and critical foreign suppliers by category.
| name | type | required | description |
|---|---|---|---|
country | string | yes | ISO 2-letter country code |
get_full_supply_chain_graph1 paramGet the complete supply chain graph with all edges. Returns supplier/customer org details, product/service, category, criticality, value, and sole-source status. Use sparingly — returns a large dataset.
| name | type | required | description |
|---|---|---|---|
category | string | no | Filter by category (optional) |
search_investments6 paramsSearch investments in AI compute infrastructure: CHIPS Act grants, sovereign AI programs, hyperscaler capex, VC/PE rounds, government loans. Returns amounts, dates, programs, and linked facilities/orgs.
| name | type | required | description |
|---|---|---|---|
investment_type | string | no | Filter by investment typechips_act_granteu_chips_actsovereign_ai_programhyperscaler_capexvc_roundpe_investmentcorporate_balance_sheetproject_financegovernment_loantax_incentive |
country | string | no | Filter by country |
org_name | string | no | Filter by investor or recipient name |
min_amount_usd | number | no | Minimum investment amount (USD) |
status | string | no | Filter by investment statusannouncedcommitteddisbursedcancelled |
limit | number | no | Max results (default 50) |
get_investment_timeline1 paramGet investment aggregations over time — monthly totals, counts, and breakdowns by type. For trend analysis of compute infrastructure spending patterns.
| name | type | required | description |
|---|---|---|---|
year | number | no | Filter to a specific year (optional) |
get_sovereign_programs1 paramGet government AI investment programs including announced amounts, disbursed amounts, GPU details, key partners, and interdependence analysis. For analyzing sovereign AI capabilities and dependencies.
| name | type | required | description |
|---|---|---|---|
country | string | no | Filter by country code (optional) |
get_bis_designations2 paramsGet BIS Entity List entries and other export control designations. Returns entity names, countries, designation dates, grounds for listing, and Federal Register citations.
| name | type | required | description |
|---|---|---|---|
country | string | no | Filter by designated entity country |
search | string | no | Search by entity name |
get_bis_cross_references2 paramsCross-reference BIS Entity List designations against organizations in the Scrutica database. Uses 4-layer fuzzy matching (exact name, alias, Jaccard similarity, trigram). Returns matched organizations with facility count, supply chain connections, and match confidence score.
| name | type | required | description |
|---|---|---|---|
country | string | no | Filter by country |
min_confidence | number | no | Minimum match confidence 0-1 (default 0.5) |
get_country_analytics3 paramsGet aggregated compute infrastructure statistics by country: facility count, total power MW, total GPU count, total FLOPS, organization count. For country-level comparisons and rankings.
| name | type | required | description |
|---|---|---|---|
country | string | no | Single country code (omit for all countries) |
sort_by | string | no | Sort field (default: facility_count desc)facility_counttotal_power_mwtotal_gpu_counttotal_peak_pflops |
limit | number | no | Top N countries (default all) |
get_compute_overview0 paramsGet high-level platform statistics: total facilities, total organizations, total investments, total power MW, total GPU count, countries covered. For overview and summary responses.
get_facility_type_breakdown0 paramsGet count and capacity breakdown by facility type (hyperscale DC, colocation, logic fab, memory fab, packaging, HPC, etc.). For understanding the composition of global compute infrastructure.
compare_entities2 paramsSide-by-side comparison of facilities, organizations, or countries. Returns a structured comparison with all relevant metrics aligned. For direct comparison queries.
| name | type | required | description |
|---|---|---|---|
entity_type | string | yes | Type of entities to comparefacilityorganizationcountry |
entity_names | array<string> | yes | Names of entities to compare (2-5). For countries, use ISO codes. |
search_hardware5 paramsSearch the hardware catalog for GPU, TPU, ASIC, and interconnect specifications. Returns compute performance (FP16/FP32/BF16 TFLOPS), memory, TDP, process node, and export control status. For comparing chip specs or identifying which hardware is export-controlled.
| name | type | required | description |
|---|---|---|---|
search | string | no | Search by hardware name (e.g., "H100", "A100", "MI300X") |
manufacturer | string | no | Filter by manufacturer (e.g., "NVIDIA", "AMD", "Google") |
category | string | no | Filter by hardware categorygpucputpuasicfpgainterconnectmemory |
export_controlled | boolean | no | Filter for export-controlled hardware only |
limit | number | no | Max results (default 50) |
search_deployments6 paramsSearch compute deployments: GPU clusters, training runs, cloud regions. Returns hardware type, GPU count, cluster name, training FLOPS, organization, and linked facility. For understanding who is deploying what compute where.
| name | type | required | description |
|---|---|---|---|
org_name | string | no | Organization name (fuzzy matched) |
deployment_type | string | no | Filter by deployment typetraining_rungpu_clustercloud_regioninference_fleet |
hardware_type | string | no | Filter by hardware (e.g., "H100", "A100") |
status | string | no | Filter by deployment statusannouncedactivecompletedcancelled |
min_gpu_count | number | no | Minimum GPU count |
limit | number | no | Max results (default 50) |
get_compute_pricing3 paramsGet cloud GPU pricing data by provider, hardware type, region, and pricing model. Returns price per GPU-hour for comparison across cloud providers.
| name | type | required | description |
|---|---|---|---|
provider | string | no | Cloud provider name (e.g., Azure, AWS, GCP) |
hardware_type | string | no | GPU model identifier |
pricing_model | string | no | Pricing modelon_demandreserved_1yrreserved_3yrspot |
search_trade_flows9 paramsQuery bilateral semiconductor trade flows (HS 8542 integrated circuits). 397K records from UN Comtrade (25 reporters), CEPII BACI (231 reporters), Taiwan Customs, China GACC, and Japan e-Stat. Covers 2010-2026. Use this to answer: "How much did China import from Japan in 2023?", "Show US chip exports to China over time", "Which countries does Taiwan export the most ICs to?"
| name | type | required | description |
|---|---|---|---|
reporter_country | string | no | ISO3 reporter country code (e.g., CHN, USA, JPN, KOR, TWN, NLD, DEU). Use CHN for China, USA or US for United States. |
partner_country | string | no | ISO3 partner country code. The trade counterparty. |
direction | string | no | Trade direction from reporter perspective. China GACC data uses "both" (combined). Default: include all.exportimportboth |
hs_code | string | no | HS code filter (e.g., 854231 for processors, 854232 for memory, 854239 for other ICs). Omit for all IC codes. |
year_start | number | no | Start year (inclusive). Default: 2010. |
year_end | number | no | End year (inclusive). Default: 2026. |
data_source | string | no | Filter by source (un-comtrade, cepii-baci-hs92, china-customs-gacc, japan-estat-mof, taiwan-customs-dgcas) |
aggregate_by | string | no | How to aggregate results. "year" = annual totals. "partner" = by trading partner. "none" = raw records (limited to 100). Default: year.yearpartnerhs_codedirectionnone |
limit | number | no | Max results. Default 25. Raw mode max 100. |
search_pjm_queue6 paramsQuery the PJM interconnection queue (6,093 entries). Shows planned and active power projects in PJM territory (Northern Virginia, Ohio, Maryland, Pennsylvania — the densest data center corridor in the world). Use this to answer: "How much power is queued in Virginia?", "What DC-region projects are active?", "Show PJM queue by state."
| name | type | required | description |
|---|---|---|---|
state | string | no | US state abbreviation filter (e.g., VA, OH, MD, PA, NJ, IL, IN) |
queue_status | string | no | Filter by project status. Default: include all.ActiveIn ServiceUnder ConstructionEngineering and ProcurementWithdrawnSuspended |
is_dc_region | boolean | no | Filter to data center-heavy regions only. Default: include all. |
min_capacity_mw | number | no | Minimum capacity in MW. Default: no minimum. |
aggregate_by | string | no | How to aggregate results. Default: state.statequeue_statusfuel_typetransmission_ownernone |
limit | number | no | Max results. Default 25. Raw mode max 100. |
get_capacity_snapshots5 paramsGet temporal compute capacity snapshots for facilities. Shows how capacity changed over time (GPU additions, power upgrades, new phases). Use this to answer: "When did xAI Colossus add GPUs?", "How has TSMC fab capacity changed?"
| name | type | required | description |
|---|---|---|---|
facility_id | string | no | Facility ID to get snapshots for |
org_id | string | no | Organization ID — returns snapshots for all their facilities |
year_start | number | no | Filter snapshots from this year |
year_end | number | no | Filter snapshots up to this year |
limit | number | no | Max results. Default 50. |
get_threshold_compliance2 paramsLook up compute-threshold regulatory compliance status. Three modes: (a) pass `model_name` to see which active regimes (EU AI Act 10²⁵, China CAC ~10²⁴, rescinded US EO 14110 10²⁶) a specific frontier model crosses; (b) pass `regime_id` to see the regime details and which models exceed it; (c) pass neither for a global summary (counts above each major threshold). Sources: Epoch AI Notable AI Models dataset (authority tier 2, all model FLOP estimates are estimates — `is_estimated: true`); regulation text and authority tiers per regime.
| name | type | required | description |
|---|---|---|---|
model_name | string | no | Optional. Frontier model name (e.g., "Grok 4", "GPT-4.5", "Llama 3.1-405B"). Returns the regimes this model crosses. |
regime_id | string | no | Optional. Regime identifier (e.g., "eu-ai-act", "us-eo-14110", "china-cac-generative", "ca-sb-1047", "miri-tgt"). Returns regime details + models above it. |
list_threshold_capable_facilities3 paramsRank facilities by nameplate power capacity within the jurisdictions affected by a regulatory regime. Use this for the structural question "which facilities have the physical compute capacity to support a model that triggers regulatory obligations under regime X" — the model-level question is `get_threshold_compliance`. Returns facilities with power_capacity_mw, total_gpu_count, owner country, and is_estimated flag. NOTE: this is capacity-listing, NOT a deterministic FLOP-capable claim — facility-level FLOP-capability requires the power-path methodology described in the system prompt (PUE, MFU, GPU fraction of IT, etc.). The LLM must reason from power capacity to FLOP plausibility itself, not assert "this facility CAN train a 10²⁵ model".
| name | type | required | description |
|---|---|---|---|
regime_id | string | no | Regime identifier (default "eu-ai-act"). Filters facilities whose jurisdiction (operator country, fallback to facility country) is in the regime's affectedCountries. |
min_power_mw | number | no | Minimum nameplate power capacity in MW (default 100). |
limit | number | no | Max facilities to return (default 25, max 100). |
get_compute_visibility_index1 paramGet the Compute Visibility Index — a per-country capacity-weighted distribution of facility-operator transparency tiers (Tier 1 public-filing UBO; Tier 2 licensed-database-sourced; Tier 3 documented-but-secondary; Tier 4 operator named, chain opaque; Data_Gap operator not yet investigated). Pass `country` (ISO2) for one country's breakdown; omit for the global summary plus top-10 countries by capacity. The Index is the source of truth for "Compute Under Control" estimates by country. Backed by `mv_compute_visibility_by_country` and the `visibility_index_snapshots` table (snapshot citation handle: `scrutica:compute-visibility-index:YYYY-MM-DD`).
| name | type | required | description |
|---|---|---|---|
country | string | no | Optional ISO 3166-1 alpha-2 country code (e.g., "US", "DE", "JP"). Omit for global summary + top countries. |
get_compute_visibility_breakdown3 paramsPer-facility tier breakdown for a given country — every facility with its assigned visibility tier (Tier_1 / Tier_2 / Tier_3 / Tier_4 / Data_Gap) and the tier_reason string explaining the classification. Use after `get_compute_visibility_index` to drill into the facilities driving a country's tier mix. Sorted by power_capacity_mw descending.
| name | type | required | description |
|---|---|---|---|
country | string | yes | Required ISO 3166-1 alpha-2 country code. |
tier_filter | string | no | Optional. Restrict to one tier.Tier_1Tier_2Tier_3Tier_4Data_Gap |
limit | number | no | Max facilities (default 50, max 200). |
walk_ownership_chain2 paramsWalk an organization's ownership chain upward toward the documented ultimate beneficial owner (UBO). Returns the ordered hops (max 10) with per-hop provenance: data_source on the connecting edge, confidence (HIGH/MEDIUM/LOW), as_of_date, source_class (public_filing / private_database / other), and the opacity classification on termination (terminus_listed / terminus_government / terminus_self_reference / terminus_max_hops / terminus_cycle). Use this for "who ultimately owns X" questions and for tracing PE-fund chains to their LP base. Citation: cite each hop's edge_data_source individually — the chain itself is not a single source.
| name | type | required | description |
|---|---|---|---|
org_id | string | no | Organization ID (canonical or variant — auto-resolved). Mutually exclusive with org_name. |
org_name | string | no | Organization name (fuzzy matched). Resolved to canonical ID before walking. |
search_procurement_records18 paramsSearch the Scrutica sovereign-execution procurement substrate (USAspending federal contracts, simpler.grants.gov federal solicitations, EU TED tenders, Korean MSIT awards, manual curations). One row per primary record; the record_type column distinguishes solicitation / award / subaward / modification / cancellation. Returns the per-record classifier breakdown (confidence + category + ai_relevance + reasoning) plus the per-component authority tiers (announced / committed / disbursed / deployed_chip / deployed_facility / deployed_utility) so the LLM can cite the MIN-of-inputs composite tier per the classifier methodology. Use for queries like "DoD AI contracts in Q4 2025", "EU Tier-1 frontier-AI tenders", "FedRAMP awards classified as training_compute", "awards over $10M with confidence above 0.9". The substrate is updated by the ingest crons (sovexec-usaspending weekly, sovexec-fed-solicitations daily, sovexec-eu-ted daily, manual MSIT) and resolves awardee names against organization_aliases at write time.
| name | type | required | description |
|---|---|---|---|
country | string | no | ISO 3166-1 alpha-2 country code of the procurement (e.g., "US" for USAspending, "EU" or member-state ISO2 for EU TED, "KR" for MSIT). Full names auto-resolve. |
data_source | string | no | Filter by source. usaspending=US federal contracts, simpler_grants_gov=US federal solicitations (DARPA BAAs, DOE FOAs, NSF AI institutes, NASA ROSES; replaces SAM.gov ingestion as of 2026-05-10), eu_ted=EU tenders, msit_korea=Korean MSIT awards.usaspendingsimpler_grants_goveu_tedmsit_koreakonepsmanual_curation |
record_type | string | no | Filter by procurement-record type (default: include all).solicitationawardsubawardmodificationcancellation |
execution_stage | string | no | Section 7 Constraint 1 — pipeline stage. announced=unsigned commitment, committed=signed contract, disbursed=cash flowed, deployed=infrastructure operational (compositional per Section 7 Constraint 2).announcedcommitteddisburseddeployed |
classifier_category | string | no | Filter by the v1.0 classifier output category. training_compute, inference, datacenter_construction = high AI-relevance buckets; general_it_services, other = low-relevance baseline.training_computeinferenceresearch_grantdatacenter_constructiongeneral_it_servicesotherunclassifiable |
classifier_ai_relevance | string | no | Filter by AI-relevance band per the classifier methodology.highmediumlownone |
awardee_name | string | no | Partial case-insensitive match on the awardee_raw_name column (uses gin trigram index for performance). |
awarding_agency | string | no | Filter by awarding agency name (e.g., "Department of Defense", "European Health and Digital Executive Agency"). Partial case-insensitive match. |
naics_psc_cpv_code | string | no | Procurement classification code: NAICS for USAspending (e.g., 541512 IT Design), PSC for DoD (e.g., D399), CPV for EU TED (e.g., 72000000), KSIC for MSIT. Stored as a single TEXT column because the three taxonomies do not collide on prefix. |
fiscal_year | number | no | Filter by fiscal year of the record. |
date_from | string | no | ISO date YYYY-MM-DD; lower bound on procurement_date (inclusive). |
date_to | string | no | ISO date YYYY-MM-DD; upper bound on procurement_date (inclusive). |
min_value_usd | number | no | Minimum total_value_usd. Records with NULL total_value_usd are excluded by this filter. |
min_confidence | number | no | Minimum classifier_confidence threshold (0-1). The methodology default rollup floor is 0.7; values below 0.7 are typically queue-bound. |
min_authority_tier | number | no | Minimum (best) authority_tier filter — 1=primary measurement/filing, 2=research database, 3=press/analyst, 4=estimated/inferred. Pass 1 to restrict to primary-source records. |
human_reviewed_only | boolean | no | When true, restrict to records that have passed admin classifier-review (human_reviewed=true). Useful for "show me records past human review for country X". |
sort_by | string | no | Sort field (default: total_value_usd descending).total_value_usdprocurement_dateclassifier_confidence |
limit | number | no | Max records to return (default 25, max 100). |
get_executed_allocation_rollup3 paramsPer-country, per-stage rollup of sovereign procurement execution (announced → committed → disbursed → deployed). Backed by the executed_allocations denormalized table (trigger-maintained on procurement_records writes) plus a read-side accessor that re-derives mean classifier confidence and the SWF-pattern execution_stage_note narrative on read. Returns the disclosure_state classification (with_records / disclosed_zero / structurally_undisclosed / no_ingest_yet) so the LLM can frame Saudi PIF / UAE Mubadala / Singapore Temasek / Norway GPFG style structural-non-disclosure correctly rather than as data gap. Composite authority tier is computed MIN-of-inputs per the classifier methodology (a tier-1 facility-evidence claim does NOT inflate a tier-3 chip-allocation press report into a tier-1 deployed assertion). Use for queries like "Saudi sovereign AI execution by stage", "compare announced vs deployed for top sovereign programs", "Korean MSIT FY2024 disbursement". For per-record drill-down use search_procurement_records.
| name | type | required | description |
|---|---|---|---|
country | string | no | ISO 3166-1 alpha-2 country code (full names auto-resolve via NAME_TO_ISO). |
countries | array<string> | no | Multiple ISO2 codes for batched comparison. When supplied, returns a Map keyed by ISO2; omits per-record drill-down to keep payload tractable. |
human_reviewed_only | boolean | no | When true, only count records that passed admin classifier-review. |
search_classifier_review_queue10 paramsRead-only access to the admin classifier-review queue and its append-only audit log. Surfaces unresolved records (resolved_at IS NULL) flagged by the trigger for confidence_below_threshold (<0.7), category_unclassifiable, authority_tier_min_4, or operator manual_flag. Joined with procurement_records on the procurement_record_id PK. The audit log captures every admin action (approved / rejected / reclassified / manual_data_added / manual_flag) with prior_state + new_state JSONB diffs; pass include_audit_log=true to fetch the joined audit trail per record. NOT a mutation surface — write paths remain admin-UI-only at /admin/classifier-review. Use for "unresolved review-queue entries", "records flagged below confidence 0.5", "audit log for record X", "records re-classified in the last week".
| name | type | required | description |
|---|---|---|---|
resolution_state | string | no | open=unresolved (resolved_at IS NULL); approved/rejected/reclassified/manual_data_added=resolved with that resolution_action; all=both. Default: open.openapprovedrejectedreclassifiedmanual_data_addedall |
queue_reason | string | no | Filter by why the record was queued.confidence_below_thresholdcategory_unclassifiableauthority_tier_min_4manual_flag |
country | string | no | ISO 3166-1 alpha-2 country code; filters the joined procurement_record by country. |
data_source | string | no | Filter by joined procurement_records.data_source.usaspendingsimpler_grants_goveu_tedmsit_koreakonepsmanual_curation |
awardee_name | string | no | Partial case-insensitive match on procurement_records.awardee_raw_name. |
max_confidence | number | no | Restrict to records below this classifier_confidence (0-1). Useful for "below 0.5 confidence" queries. |
queued_from | string | no | ISO date YYYY-MM-DD; lower bound on queued_at. |
queued_to | string | no | ISO date YYYY-MM-DD; upper bound on queued_at. |
include_audit_log | boolean | no | When true, fetch the per-record audit-log entries (max 10 per record) for the returned queue rows. Default false — adds an extra round-trip. |
limit | number | no | Max queue rows to return (default 25, max 100). |
get_regulatory_impact_prescore3 paramsSimulate the structural reach of a hypothetical BIS Entity List addition (or other designation type). Given a seed organization, computes the affiliate-graph closure (downward through SUBSIDIARY/JV/AFFILIATE edges, max 4 hops), the facilities operated/owned by entities in that closure, country distribution, sovereign-LP exposure breakdown (PIF, Mubadala, Temasek etc. with disclosed dollar amounts), and coordination-gap classifications. Returns an ImpactReport: closure size, affected facility count, total power MW + H100-equivalent GPUs, country rollups, sovereign-LP breakdown. NOT a legal interpretation — see caveats[] in the result. NOT a prediction of BIS behavior — structural reach only. Use this for "if BIS designated X, what would be caught" pre-decision analysis.
| name | type | required | description |
|---|---|---|---|
org_id | string | no | Seed organization ID (canonical or variant — auto-resolved). Mutually exclusive with org_name. |
org_name | string | no | Seed organization name (fuzzy matched). Resolved to canonical ID before walking. |
designation_type | string | no | Designation type (default BIS_ENTITY_LIST). Affects the report's metadata + caveat lines but not the closure walk shape.BIS_ENTITY_LISTSDNEU_SANCTIONS |
simulate_cascade_scenario5 paramsRun a supply-chain cascade-propagation simulation given a named perturbation (e.g., "TSMC Fab 18 offline 30 days", "ASML disrupted", "Tokyo earthquake"). Returns the propagated impact graph: affected nodes, weighted edge dynamics, inventory-buffer absorption, substitution paths, and historical-backtest comparison rows where the same shock pattern has resolved before. Wraps `src/lib/data/cascade-dynamics.ts` (`buildEdgeDynamics`, `getInventoryBufferDefs`, `getSubstitutionPathDefs`, `HISTORICAL_BACKTESTS`) + `src/lib/data/cascade.ts` (`getCascadeGraphData`). Provenance: cascade parameters carry `is_estimated: true`; the historical-backtest rows cite calibration events (Korea-Japan 2019, Renesas Naka 2021, Hsinchu 2024) with primary-source attribution.
| name | type | required | description |
|---|---|---|---|
perturbation | string | no | Free-text description of the perturbation. Examples: "TSMC Fab 18 offline 30 days", "ASML EUV shipments halted", "SCS cable cut at Luzon Strait". |
scenario_id | string | no | Optional named scenario. When supplied, the simulation uses that scenario's baseline parameters (severity, duration, affected facilities) instead of the free-text perturbation.tokyo-earthquakeiran-threatscs-cabletaiwan-straitabqaiq |
affected_org_name | string | no | Optional: name of the organization at the perturbation epicenter (fuzzy matched). When supplied, the cascade walk seeds from this org's downstream edges. |
duration_days | number | no | Override the perturbation duration (days). Used to re-scale inventory-buffer durations. |
include_substitution_paths | boolean | no | When true (default), return substitution paths the cascade could route around. When false, return only the unsubstituted propagation graph. |
get_scenario_model2 paramsReturn the structured scenario data for one of Scrutica's five named scenario models. (1) tokyo-earthquake — `src/lib/data/tokyo-earthquake-data.ts` (memory-fab concentration, seismic intensity-MMI scoring, compound NankaiTrough/Mt-Fuji scenarios, historical-disruption table). (2) iran-threat — `src/lib/data/iran-threat-data.ts` (missile/drone systems, launch sites, air-defense profiles, strike impacts on Saudi DCs). (3) scs-cable — `src/lib/data/scs-cable-data.ts` (submarine cables, landing stations, incident-attribution status, rerouting scenarios, chokepoint zones). (4) taiwan-strait — `src/lib/data/taiwan-strait-data.ts` (TSMC fab facilities, substitution paths, Chinese pathway timelines, Korea-Japan 2019 calibration). (5) abqaiq — `src/lib/data/abqaiq-data.ts` (Saudi DC + petroleum-facility shared substations, attack scenarios, air-defense gaps). Each scenario carries source URLs at the underlying data-module level; cite the specific exported constant when summarising (e.g., "MEMORY_FABS at tokyo-earthquake-data.ts:12").
| name | type | required | description |
|---|---|---|---|
scenario_id | string | yes | Required. The scenario to retrieve.tokyo-earthquakeiran-threatscs-cabletaiwan-straitabqaiq |
section | string | no | Optional. Restrict to a subsection of the scenario data (e.g., "facilities", "missiles", "cables", "scenarios", "historical_disruptions"). When omitted, returns the full scenario payload. |
compute_flop_threshold_compliance6 paramsCompute EU AI Act 10²⁵ FLOP-threshold compliance for a facility or org, with the full power-path derivation transparent in the result. Walks: nameplate MW → PUE-adjusted IT load (default 1.15) → GPU fraction of IT (0.49) → MFU (0.40) → H100-equivalent count → days-to-threshold. Returns the input parameters, intermediate values, and threshold-crossing verdict. Wraps `src/lib/data/eu-threshold-data.ts` (`computeThresholdCrossings`, `THRESHOLD_MODELS`, `JURISDICTION_PROFILES`) + `src/lib/data/governance-thresholds.ts` (`GOVERNANCE_THRESHOLDS`). Distinct from `get_threshold_compliance` (which is model-centric and uses Epoch-seeded model FLOP estimates) — this is facility-centric and uses the nameplate-power-to-FLOP derivation methodology v1.3.0.
| name | type | required | description |
|---|---|---|---|
facility_id | string | no | Facility to evaluate. Mutually exclusive with org_name. |
org_name | string | no | Organization name (fuzzy matched). All operated facilities are evaluated and the top capacity returned. |
regime_id | string | no | Regime to compute compliance against. Default "eu-ai-act" (10²⁵ FLOP).eu-ai-actus-eo-14110china-cac-generativeca-sb-1047ny-raisemiri-tgt |
pue_override | number | no | Override the default PUE 1.15. Use only with explicit justification (e.g., facility-disclosed PUE). |
gpu_fraction_override | number | no | Override the default GPU-fraction-of-IT 0.49. |
mfu_override | number | no | Override the default MFU 0.40. |
derive_cost_index_per_provider6 paramsReturn $/petaFLOP-day broken down by cloud provider, GPU type, region, and pricing model. Computes the normalisation across AWS, Azure, GCP, Oracle, CoreWeave, Lambda from `src/lib/data/pricing.ts:getCloudPricing()` (the cost-index data layer). On-prem TCO 3yr/5yr surfaces alongside as the build-vs-buy boundary. Source per row: provider pricing-page snapshot date + Epoch ML hardware spec (dense BF16 TFLOP/s; no 2:4 sparsity). Filter via params; omit all to return the global rollup. Distinct from `get_compute_pricing` (which returns raw $/GPU-hour cells) — this returns the petaFLOP-day-normalised, throughput-aware rollup.
| name | type | required | description |
|---|---|---|---|
provider | string | no | Cloud provider name filter (e.g., "AWS", "Azure", "GCP", "Oracle", "CoreWeave", "Lambda"). Case-insensitive. |
gpu_type | string | no | GPU type filter (e.g., "H100", "H200", "B200", "A100", "MI300X"). |
region | string | no | Region filter (e.g., "us-east-1", "europe-west4"). |
pricing_model | string | no | Pricing model filter.on_demandreserved_1yrreserved_3yrspot |
sort_by | string | no | Sort field. Default: cost_per_pflop_day_asc (cheapest first — the dimension that drives most decisions).cost_per_pflop_day_asccost_per_pflop_day_descprovidergpu_type |
limit | number | no | Max rows. Default 50. |
get_page_methodology1 paramReturn the methodology block for a Scrutica page. Wraps `src/lib/data/page-descriptions.ts:getPageDescription(route)` (canonical per-page metadata: title, audience-block prose, methodology, source list, authority-tier breakdown). Use for "how does Scrutica calculate X?" — returns the actual current methodology text rendered on the page, not a paraphrase. Cite the route + the specific methodology section when summarising.
| name | type | required | description |
|---|---|---|---|
route | string | yes | Route path (e.g., "/cost-index", "/sovereign-ai", "/cascade", "/threshold-atlas", "/concentration-monitor"). Hash anchors stripped automatically. |
get_methodology_section1 paramReturn one labeled methodology subsection from the /methodology page. Wraps the methodology page's structured data layer + section anchors (e.g., "validation-6", "flop-estimation-bounds", "cascade-criticality-weighting", "threshold-derivation"). Distinct from `get_page_methodology` (which returns a single page's full methodology); this drills into a specific named subsection within /methodology.
| name | type | required | description |
|---|---|---|---|
section_id | string | yes | Section anchor (e.g., "flop-estimation-bounds", "cascade-criticality-weighting", "threshold-derivation", "data-quality-tiers"). Lookup happens against page-descriptions.ts methodology subsections + the /methodology page rendered structure. |
get_page_content2 paramsReturn the rendered prose content displayed on a Scrutica page. Wraps `src/lib/data/page-descriptions.ts:PAGE_DESCRIPTIONS[route]` — the canonical per-page metadata (title, short description, long description, audience-block variants for technical / policy users, OG image slug, category, source list). Use for "what does the [page] currently say about [topic]?" — the model retrieves the rendered prose then summarises against the user's question. Distinct from `get_page_methodology` (which returns just the methodology block); this returns the displayed body content.
| name | type | required | description |
|---|---|---|---|
route | string | yes | Route path (e.g., "/sovereign-ai", "/trade-impact", "/concentration-monitor"). Hash anchors stripped. |
audience | string | no | Which audience-block variant to return. Default "both" — returns both versions when the page exposes them.technicalpolicyboth |
recent_editorial_corrections3 paramsReturn the N most recent rows from the corrections log — Scrutica's public log of substantive data corrections (wrong-value fixes, methodology revisions, source-attribution corrections). Wraps `src/lib/data/corrections.ts:CORRECTIONS`. Each entry: id, correction_date, affected_path (route), prior_state, corrected_state, root_cause, source_url, authority_tier. Use this to answer "what's been corrected recently?" with verified post-correction values, NOT to surface uncorrected drafts. The corrections layer is the audit trail of the platform's "verify, never hedge" discipline.
| name | type | required | description |
|---|---|---|---|
limit | number | no | Max corrections to return. Default 10. |
since | string | no | ISO date YYYY-MM-DD; only return corrections after this date. |
affected_path_filter | string | no | Filter to corrections affecting a specific route prefix (e.g., "/sovereign-ai" matches all sovereign-AI corrections). |
search_corrections_log2 paramsFull-text search the corrections log. Wraps `src/lib/data/corrections.ts:CORRECTIONS`. Use for "has Scrutica corrected anything about [entity X]?" — searches across affected_path, prior_state, corrected_state, root_cause prose. Distinct from `recent_editorial_corrections` (chronological); this is keyword-driven.
| name | type | required | description |
|---|---|---|---|
query | string | yes | Search keywords (e.g., "Huawei", "TSMC", "FLOP threshold", "BIS"). Matches case-insensitively across all corrections fields. |
limit | number | no | Max corrections to return. Default 20. |
get_data_freshness2 paramsReturn per-data-source freshness state — when each substrate was last refreshed, the freshness-class TTL, and the current freshness color (fresh / aging / stale). Wraps `src/lib/freshness.ts` (`FreshnessClass`, `FRESHNESS_TTLS`, `computeFreshnessLevel`). Freshness classes: regulatory (4h TTL, e.g., BIS Federal Register feeds), market (24h, e.g., trade flows), structural (90d, e.g., facility ownership), narrative (365d, e.g., historical scenarios). Use for "how fresh is the [layer] data?" or "what's overdue for refresh?".
| name | type | required | description |
|---|---|---|---|
data_source | string | no | Optional: filter to one data source (e.g., "epoch-notable-models", "bis-entity-list", "supply-chain-edges"). Omit for the full registry. |
freshness_class | string | no | Optional: filter to one freshness class.regulatorymarketstructuralnarrative |
get_authority_tier_provenance2 paramsReturn the authority-tier provenance metadata for a facility record: data_source, source_url, is_estimated, authority_tier, data_vintage, confidence_score (where applicable). Wraps `src/lib/data/data-quality-flags.ts:getDataQualityFlagsForFacility(facilityId)`. The Tier 1-4 hierarchy: Tier 1 = primary measurement / regulatory filing, Tier 2 = research database, Tier 3 = press / analyst, Tier 4 = inferred / estimated. The Citations Panel UI consumes this output to render per-claim provenance badges. The system prompt instructs the model to call this tool whenever a tool result lacks provenance fields needed to complete a citation.
| name | type | required | description |
|---|---|---|---|
facility_id | string | yes | Required. Facility ID whose data-quality flags should be retrieved. |
field | string | no | Optional. Filter to one field (e.g., "power_capacity_mw", "total_gpu_count"). When supplied, only that field's flag is returned. |
get_chokepoint_anatomy1 paramReturn the layer-by-layer anatomy of the AI compute supply-chain chokepoint structure — the "hourglass" shape (many AI labs and materials at the ends, extreme concentration in fab/packaging/equipment in the middle). Wraps `src/lib/data/market-shares.ts` (HBM_SHARES, ADVANCED_FOUNDRY_SHARES, OVERALL_FOUNDRY_SHARES, EUV_SHARES) plus the rendered concentration summary at /chokepoint-anatomy. Each layer carries: concentration_level (moderate / high / extreme), summary_text, vintage, source. Use for "show me the supply-chain concentration map" or "where is the system most exposed?".
| name | type | required | description |
|---|---|---|---|
layer_filter | string | no | Optional. Filter to one layer (e.g., "AI Labs", "Cloud & Infrastructure", "Chip Design", "Advanced Packaging", "HBM Memory", "Fabrication", "Equipment", "Materials & Chemicals"). |
get_concentration_metrics3 paramsReturn concentration metrics (HHI, top-N share, severity, governance leverage) for a given product/service category. Wraps `src/lib/data/emerging-chokepoints-analysis.ts:getEmergingChokepointAnalysis()` (`getTopChokepoints`, `getChokepointsByTrajectory`, `getChokepointExportData`, `WEIGHT_SCHEMES`, `getWeightSensitivity`). Categories include: HBM, advanced foundry, EUV lithography, photomask, photoresist, lead-frame substrate, optical interconnect, etc. The Herfindahl-Hirschman Index quantifies market concentration on a 0-10000 scale; HHI > 2500 = high concentration; HHI > 5000 = near-monopoly. Use for "which product categories are most concentrated?" or "how concentrated is HBM3 supply?".
| name | type | required | description |
|---|---|---|---|
category | string | no | Optional. Restrict to one category (e.g., "advanced_foundry", "hbm_memory", "euv_lithography"). Omit for all categories. |
sort_by | string | no | Sort field. Default hhi_desc (most concentrated first).hhi_descseverity_descgovernance_leverage_desc |
limit | number | no | Max categories to return. Default 20. |
get_country_profile_summary1 paramReturn the aggregated country profile — facility count + total power MW + total GPUs + total estimated PFLOP, sovereign program count + announced + disbursed, supply-chain dependency vector (top foreign suppliers per critical category), governance reach metrics (export-control jurisdiction, regime memberships). Wraps `src/lib/data/country-profile.ts:getCountryProfile(countryCode)` + `getAllCountryStackScores`. Use for "what's [country]'s compute posture?" — returns a single dense summary instead of stitching together 4 separate tools. Distinct from `get_country_analytics` (which returns just the per-country stat rollup); this returns the qualitative profile + structural-vulnerability narrative.
| name | type | required | description |
|---|---|---|---|
country | string | yes | Required. ISO 3166-1 alpha-2 country code (e.g., "US", "DE", "TW", "JP", "KR", "CN", "IN"). Full country names auto-resolve. |
get_emerging_chokepoints4 paramsReturn Scrutica's active emerging-chokepoint feed — supply-chain constraints currently elevated to watch / elevated / high / critical severity, with deadline-bound risks (e.g., "CoWoS capacity shortfall through Q4 2026", "EU power grid pre-emption Phase 1 begins 2026-09-01"). Wraps `src/lib/data/emerging-chokepoints.ts:EMERGING_CHOKEPOINTS` (`getChokepointsBySeverity`, `getChokepointsByCategory`, `getChokepointsWithDeadline`). Each entry: id, severity, category, summary, evidence, deadline (where applicable), affected_orgs, governance_leverage. Use for "what supply-chain risks are active right now?" or "what's elevated to critical?".
| name | type | required | description |
|---|---|---|---|
severity | string | no | Filter by severity level.criticalhighelevatedwatch |
category | string | no | Filter by chokepoint category (e.g., "memory", "advanced_packaging", "power", "logic_fab", "equipment"). |
with_deadline_only | boolean | no | When true, return only chokepoints with explicit deadlines (e.g., capacity shortfalls bounded in time). |
limit | number | no | Max chokepoints to return. Default 20. |
search_bis_license_actions8 paramsSearch BIS annual country-licensing data (Bureau of Industry & Security export license approvals/denials by destination country, ECCN code, and approval status). 2,587 rows covering CY2018-2022. Wraps `src/lib/data/bis-license-actions.ts:getBisOverlayData` + `getBisCountryEccnDetail`. Each row: country (ISO3), year, eccn_code, approval_count, denial_count, return-without-action count, total_value_usd, friction_pct (denial+RWA / total), friction_tier (low/elevated/anomalous). Use for "what was the friction rate for chip exports to [country] in [year]?" or "which countries had anomalous friction on AI hardware ECCNs?". Note: BIS publishes this data annually; CY2023+ pending.
| name | type | required | description |
|---|---|---|---|
country_iso3 | string | no | ISO 3-letter country code (e.g., "CHN", "RUS", "ARE"). Mutually exclusive with country_iso2 — pass either, the executor resolves. |
country_iso2 | string | no | ISO 2-letter country code; auto-resolved to ISO3 internally. |
year_start | number | no | Start year filter (default 2018). |
year_end | number | no | End year filter (default latest). |
eccn_prefix | string | no | ECCN prefix (e.g., "3A001" for sub-cat AI/HPC chips, "5A002" for crypto). Partial match. |
min_friction_pct | number | no | Minimum friction percentage filter (0-100). Use 50 for "majority denied". |
friction_tier | string | no | Filter by friction-tier classification.low_frictionelevated_frictionanomalous_frictionunknown |
limit | number | no | Max rows. Default 50. |
get_hbm_market_share4 paramsReturn quarterly HBM (high-bandwidth memory) merchant market share by manufacturer. Wraps `src/lib/data/hbm-market-share.ts:getHbmMarketShareRows()` + `getHbmCanonicalShareByCell` (the per-quarter / per-product-tier / per-manufacturer share table). Manufacturers: SK Hynix, Samsung, Micron. Product tiers: HBM2E, HBM3, HBM3E. Sources: Astute Group, TrendForce, Yole Développement, manufacturer disclosures. Per-cell `is_estimated` + source_priority + data_vintage. Use for "what's the current HBM3E share split?" or "how have HBM shares moved since 2024?". Multi-source divergence is surfaced — the canonical-share-per-cell function applies the cn-source-priority resolution rule.
| name | type | required | description |
|---|---|---|---|
product_tier | string | no | HBM product tier filter. Default "all".HBM2EHBM3HBM3Eall |
manufacturer | string | no | Manufacturer filter. Default "all".SK HynixSamsungMicronall |
quarter | string | no | Specific quarter (e.g., "Q3 2025"). When omitted, returns latest available quarter. |
canonical_only | boolean | no | When true, return the canonical (priority-resolved) share per cell, not all source variants. Default true. |
get_eu_grid_status3 paramsReturn EU electricity grid capacity, HVDC interconnects, and per-country grid signal — the substrate behind sovereign-AI grid pre-emption analysis. Wraps `src/lib/data/eu-grid.ts:getEuGridChokepointData` (PyPSA-eur substations + transmission lines + HVDC interconnects). Per-country: nameplate generation MW, current draw MW, headroom MW, hyperscale-DC announcement count, announced power MW vs grid headroom, pre-emption-risk flag. Substrate: 16,564 records ingested 2026-05-09 from PyPSA-eur (TSO-disclosed network model). Sources: ENTSO-E, PyPSA-eur, per-country TSO disclosures. Use for "where is the EU grid being pre-empted by hyperscale buildout?" or "what's [country]'s grid headroom for AI compute?".
| name | type | required | description |
|---|---|---|---|
country_iso2 | string | no | ISO 2-letter EU country code (e.g., "DE", "FR", "NL", "IE", "ES"). Omit for all countries + global summary. |
include_interconnectors | boolean | no | When true, include HVDC interconnector flow data alongside per-country signal. Default false. |
sort_by | string | no | Sort field. Default headroom_asc (tightest grids first).headroom_ascannounced_dc_power_descpreemption_risk_desc |
get_recent_developments5 paramsReturn the recent-developments feed — Scrutica's timeline of substantive changes across the substrate (tenant changes, ownership transfers, capacity milestones, regulatory actions, incidents). Wraps `src/lib/data/recent-developments.ts:getRecentDevelopmentsForFacility` extended for global-feed access. Each entry: id, effective_date, title, body, data_source, source_url, confidence (high/medium/low), category (tenant_change / ownership_transfer / capacity_milestone / regulatory / incident / other), affected_facility_id (where applicable). Use for "what's changed in the last 30 days?" or "show me [country]'s most recent compute developments".
| name | type | required | description |
|---|---|---|---|
category | string | no | Filter by development category.tenant_changeownership_transfercapacity_milestoneregulatoryincidentother |
min_confidence | string | no | Minimum confidence threshold. Default "low" (return all).highmediumlow |
days_back | number | no | Restrict to developments in the last N days. Default: include all. |
facility_id | string | no | Filter to developments affecting one facility. |
limit | number | no | Max developments to return. Default 25. |
get_training_evidence4 paramsReturn per-model training evidence — the multi-source per-model dataset Scrutica uses to cross-validate FLOP estimates against lab disclosures. Wraps `src/lib/data/training-evidence.ts` (`TrainingEvidencePageData`, `TrainingClaim`, `FacilityPowerEvidence`, `ChipAvailabilityEvidence`, `FinancialEvidence`, `SupplyChainEvidence`). Each model: training_claim (what the lab said), facility_power_evidence (where it ran, how much MW available), chip_availability_evidence (what hardware available + BIS export-control status), financial_evidence (capex / opex commitments), supply_chain_evidence (HBM / packaging / wafer availability), signal_status (consistent / insufficient / unknown). Use for "is [model]'s claimed FLOP budget consistent with the available facility / chip / supply-chain evidence?". Distinct from `get_threshold_compliance` (which returns regime-crossing verdict); this returns the underlying evidence chain.
| name | type | required | description |
|---|---|---|---|
model_name | string | no | Model name filter (e.g., "GPT-5", "Claude Opus 4", "Llama 4-405B"). Fuzzy matched. |
signal_status | string | no | Filter by overall evidence-signal status.consistentinsufficientunknown |
evidence_type | string | no | Restrict to one evidence dimension. Default "all".facility_powerchip_availabilityfinancialsupply_chainall |
limit | number | no | Max models to return. Default 25. |