[{"name":"fspl","version":"1.0.0","description":"Calculate free-space path loss (FSPL) in decibels using the ITU-R P.525 standard formula. Given a frequency in MHz and distance in kilometres, returns the expected signal attenuation in an ideal line-of-sight radio link with no obstacles, reflections, or atmospheric absorption. Also computes the RF wavelength. Use this to estimate baseline path loss before adding fade margins, antenna gains, or environmental corrections. Feeds directly into link_budget for full end-to-end analysis.","category":"rf","tags":["fspl","path-loss","propagation","itu-r","rf"],"outputFeeds":["link_budget.fspl_db"],"inputFrom":[]},{"name":"link_budget","version":"1.0.0","description":"Compute a full RF link budget from transmitter power, frequency, distance, and antenna gains. Calculates EIRP, free-space path loss (ITU-R P.525), received power at the receiver, and link margin relative to an optional receiver sensitivity threshold. Use this to determine whether a wireless link closes with adequate margin. Accepts output from noise_figure_cascade and feeds into snr_margin for full receive-chain analysis.","category":"rf","tags":["link-budget","eirp","fspl","margin","rf"],"outputFeeds":["snr_margin.rx_dbm"],"inputFrom":["noise_figure_cascade.total_nf_db"]},{"name":"dipole","version":"1.0.0","description":"Calculate physical dimensions of a dipole antenna for a given frequency. Returns half-wave or quarter-wave element length in metres, feet, and inches. A half-wave dipole is the most common resonant antenna with approximately 2.15 dBi gain. A quarter-wave monopole (ground plane antenna) is half the length and is widely used in handheld radios and vehicle-mounted systems. Use this before building or purchasing an antenna to verify element length for your operating frequency.","category":"rf","tags":["dipole","antenna","quarter-wave","half-wave","dimension"],"outputFeeds":[],"inputFrom":[]},{"name":"microstrip","version":"1.0.0","description":"Calculate PCB microstrip trace width for a target characteristic impedance using the Hammerstad-Jensen closed-form equations. Given target impedance (Z0), substrate dielectric constant (er), substrate height, and copper weight, returns the required trace width and effective dielectric constant. Optionally computes effective wavelength at a given frequency. Essential for RF PCB layout to achieve controlled impedance traces (e.g. 50 ohm for SMA connectors). References IPC-2141.","category":"rf","tags":["microstrip","impedance","pcb","trace-width","hammerstad"],"outputFeeds":[],"inputFrom":[]},{"name":"dbm_convert","version":"1.0.0","description":"Convert a power level in dBm to milliwatts, watts, dBW, and RMS voltage across a given impedance. dBm is the standard unit for RF power referenced to 1 milliwatt. This tool is essential when interfacing datasheets (which use dBm) with circuit analysis (which uses volts and watts). Default impedance is 50 ohms, matching most RF systems. Use this to quickly verify power amplifier output, receiver sensitivity, or regulatory EIRP limits.","category":"rf","tags":["dbm","milliwatt","watt","power","conversion","vrms"],"outputFeeds":[],"inputFrom":[]},{"name":"noise_figure_cascade","version":"1.0.0","description":"Calculate the cascaded noise figure of a multi-stage receiver chain using the Friis formula. Each stage has a noise figure and gain in dB. The first stage dominates overall system noise, which is why low-noise amplifiers (LNAs) are placed at the front of the chain. Returns total cascaded noise figure, total gain, and equivalent noise temperature. Feeds into link_budget for complete receive-chain sensitivity analysis.","category":"rf","tags":["noise-figure","friis","lna","cascade","receiver"],"outputFeeds":["link_budget.total_nf_db"],"inputFrom":[]},{"name":"vswr","version":"1.0.0","description":"Convert between VSWR, return loss, and reflection coefficient — provide any one parameter and get all related impedance-mismatch metrics. Computes VSWR (voltage standing wave ratio), return loss in dB, reflection coefficient (gamma), mismatch loss, and percentage of power reflected vs transmitted. Essential for antenna matching, transmission line analysis, and RF system budgeting. Feeds into link_budget for system-level mismatch accounting.","category":"rf","tags":["vswr","return-loss","reflection-coefficient","impedance","mismatch"],"outputFeeds":["link_budget.mismatch_loss_db"],"inputFrom":[]},{"name":"attenuator_pi","version":"1.0.0","description":"Design a Pi-topology resistive attenuator pad. Given a desired attenuation in dB and characteristic impedance (default 50 ohm), computes the three resistor values for a symmetrical Pi-pad network. The Pi attenuator uses two shunt resistors (R1, R3) and one series resistor (R2). Commonly used in RF signal chains to reduce signal level while maintaining impedance match. Compare with attenuator_tee for T-pad topology.","category":"rf","tags":["attenuator","pi-pad","resistor","impedance-matching","rf"],"outputFeeds":[],"inputFrom":[]},{"name":"attenuator_tee","version":"1.0.0","description":"Design a Tee-topology resistive attenuator pad. Given a desired attenuation in dB and characteristic impedance (default 50 ohm), computes the three resistor values for a symmetrical T-pad network. The Tee attenuator uses two series resistors (R1, R3) and one shunt resistor (R2). Commonly used in RF signal chains to reduce signal level while maintaining impedance match. Compare with attenuator_pi for Pi-pad topology.","category":"rf","tags":["attenuator","tee-pad","t-pad","resistor","impedance-matching","rf"],"outputFeeds":[],"inputFrom":[]},{"name":"fresnel_zone","version":"1.0.0","description":"Calculate the Fresnel zone radius at the midpoint of a radio link. Given frequency in MHz, link distance in kilometres, and zone number (1-5), returns the Fresnel zone radius in metres and feet, plus the 60% clearance threshold used in practical link engineering. The first Fresnel zone defines the region where most RF energy travels; obstructions within 60% of this radius cause significant signal degradation. Feeds into link_budget for path clearance analysis.","category":"rf","tags":["fresnel","clearance","line-of-sight","propagation","link-planning"],"outputFeeds":["link_budget.fresnel_clearance"],"inputFrom":[]},{"name":"wavelength_freq","version":"1.0.0","description":"Convert between radio frequency and wavelength. Provide either frequency in MHz or wavelength in metres, and get the full set of equivalent values: frequency in MHz and GHz, wavelength in metres, centimetres, millimetres, and feet. Essential for antenna dimensioning, waveguide selection, and quick band identification. The fundamental relationship is lambda = c / f where c is the speed of light (299 792 458 m/s).","category":"rf","tags":["wavelength","frequency","conversion","band","antenna"],"outputFeeds":[],"inputFrom":[]},{"name":"spice_template","version":"1.0.0","description":"Generate a complete SPICE netlist from a parameterized template. Supports common circuit topologies: low-pass RC filter, voltage divider, common emitter amplifier. Returns a ready-to-simulate netlist string that can be passed directly to spice_simulate. Use this when an agent needs to construct a circuit from high-level parameters without writing raw SPICE syntax. Feeds into spice_simulate for AC/DC/transient analysis.","category":"rf","tags":["spice","netlist","circuit","template","simulation"],"outputFeeds":["spice_simulate.netlist"],"inputFrom":[]},{"name":"spice_simulate","version":"1.0.0","description":"Run a SPICE circuit simulation using ngspice. Accepts a standard SPICE netlist and performs AC, DC, or transient analysis. Returns voltage and current vectors for all circuit nodes. Small circuits (≤150 components) run instantly via WebAssembly; larger circuits automatically escalate to a dedicated container and return a job ID for polling. Use spice_template to generate netlists from parameterized templates. Results feed into smith_chart for S-parameter visualization and noise_figure_cascade for multi-stage noise analysis.","category":"rf","tags":["spice","ngspice","circuit","simulation","wasm","container"],"outputFeeds":["smith_chart.s_parameters","noise_figure_cascade.noise_data"],"inputFrom":["spice_template.netlist"]},{"name":"lora_airtime","version":"1.0.0","description":"Calculates LoRa packet time-on-air using the Semtech AN1200.13 formula. Computes symbol duration, preamble time, payload symbol count, effective data rate, and the minimum transmission interval for 1% duty cycle compliance. Essential for capacity planning in LoRaWAN and Meshtastic mesh networks. Accepts spreading factor (SF7-SF12), bandwidth (125/250/500 kHz), coding rate (4/5-4/8), payload size, header mode, CRC, and optional low data rate optimization. Feeds airtime_ms to channel_utilization for mesh load analysis.","category":"mesh","tags":["lora","airtime","time-on-air","meshtastic","duty-cycle","lorawan"],"outputFeeds":["channel_utilization.airtime_ms"],"inputFrom":[]},{"name":"snr_margin","version":"1.0.0","description":"Computes LoRa link SNR margin by comparing received power against the noise floor and the spreading-factor-dependent demodulation threshold from the Semtech SX1276 datasheet. Calculates receiver noise floor from thermal noise (-174 dBm/Hz), channel bandwidth, and receiver noise figure. Returns margin in dB and a boolean link-OK indicator. Use to validate whether a LoRa or Meshtastic link will reliably decode packets. Accepts rx_power from link_budget tool output for end-to-end chain analysis.","category":"mesh","tags":["lora","snr","link-margin","sensitivity","demodulation","meshtastic"],"outputFeeds":[],"inputFrom":["link_budget.rx_power_dbm"]},{"name":"channel_utilization","version":"1.0.0","description":"Estimates Meshtastic or LoRa mesh channel utilization percentage based on node count, message rate, and per-packet airtime. Determines how much of the shared radio channel is occupied and computes the maximum number of nodes before exceeding a configurable duty cycle limit (default 10%). Returns utilization percentage, headroom, and total packet count. Chain from lora_airtime to get airtime_ms input. Essential for Meshtastic mesh deployment planning to avoid channel congestion and packet collisions.","category":"mesh","tags":["meshtastic","channel","utilization","capacity","mesh","lora"],"outputFeeds":[],"inputFrom":["lora_airtime.airtime_ms"]},{"name":"lora_range_estimate","version":"1.0.0","description":"Estimates LoRa maximum communication range by computing the free-space path loss (FSPL) link budget and applying terrain-dependent correction factors. Calculates total link budget from transmit power, antenna gains, and receiver sensitivity, then solves the FSPL equation for distance after subtracting terrain losses (0 dB open to 50 dB indoor). Returns estimated range in km, link margin at 1 km, and effective path loss. Useful for Meshtastic deployment planning and coverage mapping. Terrain corrections are empirical estimates; real-world range varies with elevation, foliage, and weather.","category":"mesh","tags":["lora","range","distance","fspl","terrain","meshtastic","coverage"],"outputFeeds":[],"inputFrom":[]},{"name":"lora_sensitivity","version":"1.0.0","description":"Calculates LoRa receiver sensitivity from spreading factor, bandwidth, and noise figure using the Semtech SX1276 datasheet SNR thresholds. Computes the noise floor from thermal noise density (-174 dBm/Hz), channel bandwidth, and receiver noise figure, then adds the spreading-factor-dependent minimum demodulation SNR. Returns sensitivity in dBm, noise floor, required SNR, and thermal noise reference. Essential for link budget planning in LoRaWAN and Meshtastic networks. Feeds sensitivity_dbm to link_budget and lora_range_estimate for end-to-end coverage analysis.","category":"mesh","tags":["lora","sensitivity","receiver","noise-floor","snr","sx1276","meshtastic"],"outputFeeds":["link_budget.rx_sensitivity_dbm","lora_range_estimate.rx_sensitivity_dbm"],"inputFrom":[]},{"name":"duty_cycle_budget","version":"1.0.0","description":"Calculates LoRa duty cycle budget for EU868, US915, AS923, and AU915 regulatory regions. Computes maximum messages per hour, minimum transmission interval, and effective data rate under regional duty cycle constraints. EU868 and AS923 enforce 1% duty cycle (ETSI); US915 has no duty cycle limit but a 400 ms dwell time per channel (FCC); AU915 has no duty cycle limit. Flags dwell-time-limited regions where packet airtime must not exceed the dwell time. Chain from lora_airtime to get airtime_ms input for end-to-end regulatory compliance analysis.","category":"mesh","tags":["lora","duty-cycle","regulation","eu868","us915","lorawan","meshtastic","compliance"],"outputFeeds":[],"inputFrom":["lora_airtime.airtime_ms"]},{"name":"meshtastic_range","version":"1.0.0","description":"Estimates Meshtastic node communication range using real hardware profiles and firmware channel presets. Combines device-specific TX power and antenna gain (Heltec V3, RAK WisBlock, T-Beam, T-Beam Supreme, Station G2) with firmware modem presets (Long Fast, Long Slow, Very Long Slow, Medium, Short) to compute receiver sensitivity and FSPL-based range with terrain correction. Automatically populates LoRa parameters from device and channel selection, with optional overrides for custom antennas or power levels. Essential for Meshtastic deployment planning and node placement. Returns range, sensitivity, link budget, and the effective radio parameters used.","category":"mesh","tags":["meshtastic","range","heltec","rak","tbeam","station-g2","lora","coverage","distance"],"outputFeeds":["eirp_compliance.tx_power_dbm","eirp_compliance.antenna_gain_dbi","meshtastic_power.device","meshtastic_power.channel_preset"],"inputFrom":[]},{"name":"eirp_compliance","version":"1.0.0","description":"Checks EIRP (Effective Isotropic Radiated Power) compliance against regional regulatory limits for LoRa and Meshtastic operation. Computes EIRP from transmit power, antenna gain, and cable loss, then compares against FCC (US, 36 dBm), ETSI (EU, 16.15 dBm), ACMA (Australia, 30 dBm), IC (Canada, 36 dBm), and ARIB (Japan, 13 dBm) limits. Returns compliance status, margin in dB, and a warning message if over the limit. Critical for Meshtastic deployments using aftermarket high-gain antennas which can easily exceed ETSI/JP limits. Accepts tx_power and antenna_gain from meshtastic_range for chain validation.","category":"mesh","tags":["eirp","compliance","fcc","etsi","regulation","meshtastic","lora","antenna","power"],"outputFeeds":[],"inputFrom":["meshtastic_range.tx_power_dbm","meshtastic_range.antenna_gain_dbi"]},{"name":"meshtastic_power","version":"1.0.0","description":"Calculates Meshtastic node power consumption and battery runtime using device-specific power profiles and firmware role-based duty cycling. Models sleep, RX, and TX current draw for Heltec V3, RAK WisBlock, T-Beam, T-Beam Supreme, and Station G2 with GPS, BLE, and display peripheral toggles. Role selection (client, router, repeater, client_muted) controls the duty cycle model: routers stay in RX mode continuously while clients sleep between events. Returns average current, runtime in hours/days, daily Wh consumption, and time distribution across TX/RX/sleep states. Feed daily_wh to solar_sizing for off-grid planning.","category":"mesh","tags":["meshtastic","power","battery","consumption","runtime","solar","duty-cycle","sleep"],"outputFeeds":["solar_sizing.daily_kwh","battery_life.current_draw_ma"],"inputFrom":[]},{"name":"lora_param_optimizer","version":"1.0.0","description":"Recommends optimal LoRa spreading factor, bandwidth, and TX power based on target range, terrain, and optimization priority. Iterates through all SF (7-12) and BW (125/250/500 kHz) combinations, computing achievable range, airtime, data rate, and battery impact for each. Ranks candidates by priority: 'range' maximizes distance, 'speed' minimizes airtime, 'battery' minimizes power consumption, 'balanced' penalizes extremes. Respects regional TX power limits (FCC/ETSI/ACMA) and duty cycle constraints. Returns the recommended parameters with estimated range, airtime, duty-cycle message limit, battery life, and data rate. Essential for tuning Meshtastic and LoRa deployments to specific requirements.","category":"mesh","tags":["lora","optimizer","parameter","sf","bandwidth","trade-off","meshtastic","range","battery"],"outputFeeds":["lora_airtime","meshtastic_range","lora_range_estimate"],"inputFrom":[]},{"name":"zfs_capacity","version":"1.0.0","description":"Calculate usable ZFS pool capacity for any RAID level including stripe, mirror, raidz1, raidz2, and raidz3. Computes raw capacity, parity overhead, data disk count, usable terabytes after ZFS metadata overhead (checksums, block pointers, uberblocks), and storage efficiency percentage. Essential for planning NAS builds, TrueNAS/ZFS server storage, and estimating how much usable space a given disk configuration will provide. Supports variable disk sizes and configurable metadata overhead.","category":"homelab","tags":["zfs","storage","raid","nas","capacity","homelab"],"outputFeeds":["zfs_ram"],"inputFrom":[]},{"name":"zfs_ram","version":"1.0.0","description":"Calculate recommended RAM and ARC sizing for a ZFS storage pool based on workload type, pool size, deduplication status, and L2ARC cache size. Computes minimum and recommended RAM in gigabytes, ARC target size, and dedup table overhead. Accounts for workload-specific IO patterns: NAS (sequential, 1GB/TB), database (random, 2GB/TB), virtualization (mixed, 1.5GB/TB). Deduplication adds approximately 5GB per TB for the DDT. L2ARC index requires 1GB RAM per 10GB of L2ARC. Essential for TrueNAS, FreeNAS, and custom ZFS server builds.","category":"homelab","tags":["zfs","ram","memory","arc","dedup","nas","homelab"],"outputFeeds":[],"inputFrom":["zfs_capacity"]},{"name":"tcp_throughput","version":"1.0.0","description":"Calculate maximum TCP throughput using the Bandwidth-Delay Product (BDP) formula. Given link bandwidth and round-trip latency, computes the BDP (maximum in-flight data), achievable throughput with a given TCP window size, link utilization percentage, and recommended window size for full utilization. Critical for diagnosing slow transfers over high-latency links (WAN, VPN, satellite), tuning TCP buffers, and understanding why a 1Gbps link may only deliver 25Mbps with default 64KB windows. Applies to iperf testing, WAN optimization, and network capacity planning.","category":"homelab","tags":["tcp","throughput","bandwidth","latency","bdp","networking","window"],"outputFeeds":["wireguard_mtu"],"inputFrom":[]},{"name":"wireguard_mtu","version":"1.0.0","description":"Calculate the optimal MTU for a WireGuard VPN tunnel interface with a detailed overhead breakdown. Accounts for WireGuard header (32 bytes), outer IP header (20 bytes IPv4 or 40 bytes IPv6), UDP header (8 bytes), and optional PPPoE encapsulation (8 bytes). Prevents fragmentation and PMTUD black holes by computing the maximum inner packet size that fits within the physical link MTU. Essential for WireGuard setup on residential ISP connections (PPPoE), IPv6 tunnels, and any VPN where incorrect MTU causes slow or stalled connections.","category":"homelab","tags":["wireguard","mtu","vpn","networking","pppoe","ipv6","tunnel"],"outputFeeds":[],"inputFrom":["tcp_throughput"]},{"name":"subnet_calculator","version":"1.0.0","description":"Calculate IPv4 subnet details from CIDR notation. Parses a CIDR block (e.g. 192.168.1.0/24) and returns the network address, broadcast address, subnet mask, wildcard mask, first and last usable host addresses, total and usable host counts, prefix length, and classful IP class (A/B/C/D/E). Essential for homelab network planning, VLAN segmentation, firewall rule design, and understanding address space allocation. Handles special cases for /31 point-to-point links (RFC 3021) and /32 host routes.","category":"homelab","tags":["ip","subnet","cidr","network","ipv4","homelab","vlans"],"outputFeeds":[],"inputFrom":[]},{"name":"raid_iops","version":"1.0.0","description":"Estimate RAID array IOPS performance and latency for ZFS and traditional RAID configurations. Calculates maximum read IOPS, write IOPS (accounting for write penalty/amplification per RAID level), blended IOPS for a configurable read/write workload mix, and rough per-disk latency. Supports stripe, mirror, raidz1, raidz2, and raidz3. Use with HDD IOPS (~150), SATA SSD (~50000), or NVMe SSD (~100000) to compare RAID topologies and plan storage performance for databases, VMs, media servers, and general homelab NAS workloads. Chains from zfs_capacity.data_disks for integrated capacity+performance planning.","category":"homelab","tags":["raid","iops","performance","zfs","storage","latency","homelab"],"outputFeeds":[],"inputFrom":["zfs_capacity.data_disks"]},{"name":"power_cost","version":"1.0.0","description":"Calculate total power consumption, electricity cost, and circuit requirements for a homelab. Enter each device's wattage to get daily/monthly/yearly kWh and cost at your local electricity rate. Accounts for cooling overhead via PUE (Power Usage Effectiveness). Shows amperage draw at 120V and 240V and warns if you exceed the NEC 80% continuous load limit on a 15A breaker. Essential for budgeting homelab operating expenses and ensuring your electrical panel can handle the load. Chain output total_watts into cooling_btu for heat load sizing.","category":"homelab","tags":["power","electricity","cost","watts","energy","homelab","pue","breaker"],"outputFeeds":["cooling_btu.total_watts"],"inputFrom":[]},{"name":"cooling_btu","version":"1.0.0","description":"Estimate the cooling load (BTU/hr) for a homelab or server closet based on equipment wattage, room dimensions, insulation quality, and solar exposure. All electrical power converts to heat — this tool calculates equipment heat output, envelope heat gain through walls, and solar gain to produce a total BTU/hr cooling requirement. Recommends AC tonnage, mini-split sizing (rounded to standard 6K BTU increments), and exhaust fan CFM for ventilation-only cooling. Use after power_cost to size cooling for your homelab room.","category":"homelab","tags":["cooling","btu","hvac","heat","temperature","ac","homelab","mini-split"],"outputFeeds":[],"inputFrom":["power_cost.total_watts"]},{"name":"rack_capacity","version":"1.0.0","description":"Quick rack space and weight sizing calculator for homelab and small data center racks. Enter your devices with their height in rack units, weight, and wattage to get total utilization, remaining free space, weight totals in lbs and kg, and recommended PDU count based on the NEC 80% continuous load rule (1920W per 20A/120V PDU). Estimates cable management overhead at 2U per 10U of installed gear. Outputs total_watts that chains into power_cost and cooling_btu for full infrastructure planning.","category":"homelab","tags":["rack","capacity","weight","pdu","homelab","server","42u"],"outputFeeds":["power_cost.total_watts","cooling_btu.total_watts"],"inputFrom":[]},{"name":"network_bandwidth","version":"1.0.0","description":"Plan and validate network link capacity for homelab workloads. Determine whether a 1G, 2.5G, 10G, or faster link can handle your concurrent streams (VMs, backups, media, iSCSI). Calculates effective bandwidth after TCP/IP overhead, total required bandwidth, utilization percentage, and remaining headroom. Flags saturation at 80% utilization and identifies whether the bottleneck is network or storage. Provides a 1TB transfer time reference and recommends the next link speed upgrade if your current link is saturated. Useful for planning NIC upgrades, switch purchases, and storage network design.","category":"homelab","tags":["network","bandwidth","throughput","10g","homelab","bottleneck","speed"],"outputFeeds":[],"inputFrom":[]},{"name":"thermal_enclosure","version":"1.0.0","description":"Run a CFD thermal simulation of a rectangular enclosure using OpenFOAM. Models steady-state airflow and heat transfer for server racks, electronics housings, and equipment cabinets. Accepts enclosure dimensions, heat source positions and wattages, and airflow configuration. Returns temperature extremes, hotspot locations, airflow velocity summary, and thermal resistance. Runs as an async container job — submit and poll for results. Typical runtime: 1-15 minutes depending on mesh density. Maximum enclosure volume ~1m³ at default mesh density.","category":"homelab","tags":["thermal","cfd","openfoam","enclosure","cooling","server-rack","container"],"outputFeeds":[],"inputFrom":[]},{"name":"heatsink_cfd","version":"1.0.0","description":"Run a CFD simulation of a fin-array heatsink using OpenFOAM. Models forced-convection airflow over an extruded fin profile to compute thermal resistance, pressure drop, and temperature distribution. Use for heatsink selection and optimization in electronics cooling. Accepts base dimensions, fin geometry, airflow speed, and heat load. Returns optimal fin spacing suggestion based on the simulation results. Async container job — submit and poll.","category":"homelab","tags":["heatsink","thermal","cfd","openfoam","cooling","fins","container"],"outputFeeds":[],"inputFrom":[]},{"name":"pcb_thermal","version":"1.0.0","description":"Run a CFD thermal simulation of a PCB with discrete heat sources using OpenFOAM. Models a flat board with component packages at specified positions, each dissipating a given TDP. Computes board temperature map, per-component junction temperatures, and flags thermal violations. Use for PCB thermal validation and component placement optimization. Accepts board dimensions, component list, and airflow conditions. Async container job — submit and poll.","category":"homelab","tags":["pcb","thermal","cfd","openfoam","components","junction-temp","container"],"outputFeeds":[],"inputFrom":[]},{"name":"battery_life","version":"1.0.0","description":"Calculates battery runtime and energy capacity given cell capacity in mAh, nominal voltage, and average current draw. Accounts for real-world discharge efficiency (Peukert-adjacent derating) to produce effective capacity, total energy in Wh, and runtime in hours and days. Useful for IoT sensor node planning, portable device design, UPS hold-up estimation, and solar battery bank cycling analysis. Outputs feed into solar_sizing (battery_kwh) and ups_runtime (battery_wh) for system-level calculations.","category":"power","tags":["battery","runtime","capacity","mah","energy","discharge","portable","iot"],"outputFeeds":["solar_sizing","ups_runtime"],"inputFrom":[]},{"name":"wire_gauge","version":"1.0.0","description":"Determines the minimum AWG (American Wire Gauge) conductor size for a given current, voltage, one-way cable distance, and maximum allowable voltage drop percentage. Supports copper and aluminum conductors. Computes round-trip resistance, actual voltage drop in volts and percent, and wire cross-sectional area. Essential for DC solar runs, battery bank wiring, EV charging circuits, and low-voltage landscape lighting. NEC recommends 3% max drop for branch circuits and 5% total including feeder. Outputs the smallest AWG that satisfies the drop constraint.","category":"power","tags":["wire","awg","gauge","voltage-drop","copper","aluminum","wiring","electrical"],"outputFeeds":["solar_sizing"],"inputFrom":["solar_sizing","ups_runtime"]},{"name":"solar_sizing","version":"1.0.0","description":"Sizes an off-grid solar power system by calculating the number of panels and battery bank capacity required for a given daily energy consumption. Accounts for system losses (inverter, wiring, charge controller), battery depth-of-discharge, and autonomy days for cloudy weather. Outputs panel count, total panel wattage, battery capacity in kWh and Ah, and minimum charge controller amperage (with 25% safety margin per NEC 690.8). Supports 12V, 24V, and 48V system architectures. Use for cabin, RV, telecom tower, and remote IoT deployments.","category":"power","tags":["solar","photovoltaic","off-grid","panels","battery","sizing","charge-controller","renewable"],"outputFeeds":["wire_gauge","battery_life","ups_runtime"],"inputFrom":["battery_life"]},{"name":"ups_runtime","version":"1.0.0","description":"Estimates UPS (Uninterruptible Power Supply) backup runtime from battery specifications and connected load. Takes VA rating, watt rating, load in watts, and battery configuration (count, voltage, amp-hours) to compute effective stored energy after efficiency losses and runtime in minutes and hours. Detects overload conditions when load exceeds the UPS watt rating. Calculates power factor from VA/W ratings. Ideal for server rack planning, homelab power budgeting, network closet UPS selection, and graceful shutdown timer configuration.","category":"power","tags":["ups","uninterruptible","runtime","backup","battery","power-protection","server","homelab"],"outputFeeds":["battery_life"],"inputFrom":["battery_life","solar_sizing"]},{"name":"mah_to_wh","version":"1.0.0","description":"Converts battery capacity from milliamp-hours (mAh) to watt-hours (Wh), kilowatt-hours (kWh), and joules (J) given the nominal cell voltage. This is the most common battery unit conversion needed when comparing cells rated in mAh (e.g. 18650, AA) against energy budgets specified in Wh. Essential for airline lithium battery compliance (100 Wh limit for carry-on), solar battery bank sizing, and UPS capacity planning. Echoes back input values for easy chaining into battery_life, solar_sizing, and ups_runtime tools.","category":"power","tags":["mah","wh","battery","capacity","energy","conversion","milliamp-hours","watt-hours","joules"],"outputFeeds":["battery_life","solar_sizing","ups_runtime"],"inputFrom":[]},{"name":"watts_to_amps","version":"1.0.0","description":"Converts electrical power in watts to current in amps (and milliamps) for a given voltage, using the DC power formula P = V * I. Also computes the implied load resistance via Ohm's law (R = V / I) assuming a purely resistive load. This is the most common electrical conversion for circuit design, fuse selection, wire sizing, and breaker rating. Use the output amps value to feed into wire_gauge for conductor sizing or voltage_drop for cable loss analysis. Covers DC circuits; for AC with power factor, adjust watts to true power first.","category":"power","tags":["watts","amps","current","power","conversion","ohms","resistance","electrical"],"outputFeeds":["wire_gauge","voltage_drop"],"inputFrom":[]},{"name":"voltage_drop","version":"1.0.0","description":"Calculates voltage drop across a conductor run given current, wire length, AWG gauge, system voltage, and conductor material (copper or aluminum). Computes round-trip resistance, voltage drop in volts and percent, voltage at the load end, power dissipated in the wire, and NEC compliance flags (3% max for branch circuits, 5% max for feeders). Use this after wire_gauge to verify a specific gauge meets requirements, or to evaluate an existing installation. Critical for solar panel string wiring, EV charger circuits, low-voltage lighting, and any long DC or AC cable run where resistive losses matter.","category":"power","tags":["voltage-drop","wire","awg","copper","aluminum","nec","electrical","cable","resistance"],"outputFeeds":["solar_sizing"],"inputFrom":["wire_gauge"]},{"name":"battery_charge_time","version":"1.0.0","description":"Estimates battery charge time given capacity in mAh, charge current in mA, charger efficiency, and initial state of charge. Accounts for real-world charging losses (typically 80-90% efficient) to produce time in hours and minutes, energy required in Wh (at an optional voltage, default 3.7V for Li-ion), and the C-rate of the charge. Useful for solar charge controller sizing, USB charging time estimation, lead-acid float charging, and EV battery planning. The C-rate output helps verify the charge current is within safe limits (typically 0.5C-1C for Li-ion). Chain from solar_sizing charge_controller_amps to size a solar charging system end-to-end.","category":"power","tags":["battery","charge","charging","time","c-rate","soc","mah","current","solar"],"outputFeeds":["solar_sizing"],"inputFrom":["solar_sizing"]},{"name":"solar_load_audit","version":"1.0.0","description":"Calculates total daily energy consumption from an appliance list — the critical first step before sizing solar panels or batteries. Enter each appliance with its wattage, hours of daily use, and quantity. Outputs total daily kWh (with configurable safety margin for surge and inrush current), peak simultaneous wattage, and recommended inverter VA rating per NEC 125% continuous load rule. Feeds directly into solar_sizing (daily_kwh) and battery_autonomy (daily_kwh). Essential for residential, RV, cabin, and off-grid system design.","category":"power","tags":["solar","load","audit","energy","appliance","kwh","inverter","sizing","off-grid"],"outputFeeds":["solar_sizing.daily_kwh"],"inputFrom":[]},{"name":"solar_roi","version":"1.0.0","description":"Calculates solar system return on investment, payback period, and levelized cost of energy (LCOE). Models year-by-year savings accounting for panel degradation, utility rate inflation, federal Investment Tax Credit (ITC), state rebates, and annual maintenance. Outputs net cost after incentives, payback year, total lifetime savings, ROI percentage, and LCOE in cents/kWh. Essential for residential and commercial solar financial analysis, installer proposals, and comparing solar vs. grid economics over a 25-year system lifetime.","category":"power","tags":["solar","roi","payback","investment","savings","lcoe","itc","economics"],"outputFeeds":[],"inputFrom":["solar_sizing.total_panel_watts"]},{"name":"battery_autonomy","version":"1.0.0","description":"Calculates how many days a battery bank can sustain loads without solar input — critical for off-grid and backup power sizing. Accounts for depth of discharge, round-trip efficiency (lithium vs lead-acid), minimum state of charge, and optional partial solar contribution during cloudy weather. Outputs autonomy in days and hours, usable capacity, and daily deficit. Use with avg_solar_contribution_pct = 0 for worst-case (no sun) scenarios, or 20-30% for realistic cloudy-day modeling. Chains from solar_sizing (battery_kwh) and solar_load_audit (daily_kwh).","category":"power","tags":["battery","autonomy","off-grid","backup","sizing","depth-of-discharge","lithium","lead-acid"],"outputFeeds":[],"inputFrom":["solar_sizing.battery_kwh","solar_load_audit.total_daily_kwh"]},{"name":"string_sizing","version":"1.0.0","description":"Calculates optimal solar panel string and MPPT configuration based on panel electrical specs, inverter/charge-controller MPPT limits, and site temperature extremes. Applies temperature coefficients to determine Voc at minimum temperature (cold) and Vmp at maximum temperature (hot), then computes the safe range of panels per string, maximum parallel strings, and total array wattage. Prevents over-voltage damage in winter and under-voltage MPPT dropout in summer. Essential for NEC 690.7 compliant residential and commercial solar design.","category":"power","tags":["solar","string","mppt","panel","voltage","temperature","sizing","inverter","array"],"outputFeeds":["wire_gauge.current_amps"],"inputFrom":[]},{"name":"generator_offset","version":"1.0.0","description":"Compares total cost of ownership between a fuel generator and a solar+battery system over a configurable time horizon. Calculates yearly and cumulative costs for generator-only, solar-only (amortized), and hybrid scenarios. Accounts for fuel cost, generator consumption rate, maintenance intervals, solar system amortization, and battery coverage. Outputs yearly costs, total savings, breakeven year, solar coverage percentage, and generator hours saved. Essential for off-grid site planning, remote telecom towers, construction sites, and rural electrification proposals.","category":"power","tags":["generator","solar","battery","comparison","cost","fuel","hybrid","off-grid","diesel"],"outputFeeds":[],"inputFrom":["solar_sizing.total_panel_watts","solar_load_audit.total_daily_kwh"]},{"name":"wire_ampacity","version":"1.0.0","description":"Determine minimum wire gauge using NEC Table 310.16 ampacity ratings with full derating. Looks up base ampacity for copper or aluminum conductors at 60°C, 75°C, or 90°C insulation rating, then applies NEC 310.15(C)(1) ambient temperature correction and NEC 310.15(C)(2) conductor count adjustment. Automatically applies the 125% continuous load factor per NEC 210.20(A) when flagged. Returns the minimum AWG that meets the derated requirement, plus a comparison table of all gauges. Different from wire_gauge which focuses on voltage drop — use both together for complete wire sizing. Essential for residential panels, commercial feeders, solar arrays, and EV charging installations.","category":"power","tags":["ampacity","nec","wire","awg","derating","temperature","conductor","electrical","310.16"],"outputFeeds":["wire_gauge.current_amps"],"inputFrom":["wire_gauge.current_amps","solar_sizing.current_amps"]},{"name":"inverter_sizing","version":"1.0.0","description":"Size a DC-to-AC inverter for off-grid solar, battery backup, or mobile power systems. Computes the required continuous VA rating from total load watts and power factor, estimates surge capacity for motor-starting loads (3-7x rated power), applies NEC-recommended 20% derating for continuous operation, and selects the nearest standard inverter size. Also calculates DC input current at the system voltage for cable and fuse sizing. Chain from solar_load_audit to get peak_watts and largest_load_watts, then chain to wire_gauge or wire_ampacity to size the DC cables. Essential for off-grid cabins, RV/van builds, emergency backup, and solar+battery installations.","category":"power","tags":["inverter","solar","off-grid","sizing","surge","dc-ac","power","battery"],"outputFeeds":["wire_gauge.current_amps","wire_ampacity.current_amps"],"inputFrom":["solar_load_audit.peak_watts","solar_load_audit.largest_load_watts"]},{"name":"voltage_divider","version":"1.0.0","description":"Calculates output voltage, current draw, and power dissipation for a resistive voltage divider. Given an input voltage Vin and two resistor values R1 (upper) and R2 (lower), computes Vout = Vin * R2 / (R1 + R2), divider current, individual resistor power dissipation, and the division ratio. Essential for biasing circuits, level shifting, ADC input scaling, and feedback networks. Use before trace_width to size traces for divider current, or chain from a power supply output to verify signal levels.","category":"pcb","tags":["resistor","divider","voltage","bias","pcb","analog"],"outputFeeds":["trace_width","rc_filter"],"inputFrom":[]},{"name":"rc_filter","version":"1.0.0","description":"Computes the cutoff frequency, time constant, impedance, and phase shift of a first-order RC filter. Supports both lowpass and highpass topologies. The cutoff frequency is f = 1/(2*pi*R*C) where the signal is attenuated by 3 dB. The time constant tau = R*C governs transient response — the capacitor reaches 63.2% of its final value after one tau. Use for anti-aliasing before ADCs, DC blocking, noise filtering, and signal conditioning. Chain from voltage_divider to design filtered bias networks.","category":"pcb","tags":["filter","rc","lowpass","highpass","frequency","analog","pcb"],"outputFeeds":["lc_resonance"],"inputFrom":["voltage_divider"]},{"name":"lc_resonance","version":"1.0.0","description":"Calculates the resonant frequency of an LC circuit, along with optional Q factor and bandwidth when series resistance is provided. The resonant frequency f0 = 1/(2*pi*sqrt(L*C)) is where inductive and capacitive reactances cancel. Used for designing tank circuits, oscillators, bandpass filters, and antenna matching networks. If resistance R is given, computes quality factor Q = (1/R)*sqrt(L/C) and 3 dB bandwidth = f0/Q. Chain into impedance_match to design matching networks at the resonant frequency.","category":"pcb","tags":["resonance","lc","inductor","capacitor","tank","frequency","rf","pcb"],"outputFeeds":["impedance_match"],"inputFrom":["rc_filter"]},{"name":"impedance_match","version":"1.0.0","description":"Designs an L-network impedance matching circuit between two real impedances at a given frequency. Computes the required shunt and series reactive components (inductor and capacitor) to transform the source impedance to the load impedance. The network Q factor is sqrt(Rh/Rl - 1) where Rh is the higher impedance. Topology is automatically selected: the shunt element is placed across the higher impedance side. Essential for antenna matching, amplifier input/output matching, and maximizing power transfer. Chain from lc_resonance to match at a tank circuit's resonant frequency.","category":"pcb","tags":["impedance","matching","l-network","rf","antenna","pcb"],"outputFeeds":["trace_width"],"inputFrom":["lc_resonance"]},{"name":"trace_width","version":"1.0.0","description":"Calculates the minimum PCB trace width for a given current using the IPC-2221 standard formula. The IPC-2221 empirical equation relates current capacity to cross-sectional area and temperature rise: I = k * dT^0.44 * A^0.725, where k=0.048 for external layers and k=0.024 for internal layers. Supports configurable copper weight (oz/ft^2) and temperature rise. Also computes approximate DC resistance per centimeter. Essential for power delivery, high-current motor drivers, and ensuring PCB reliability. Chain from voltage_divider or impedance_match to verify trace sizing for computed currents.","category":"pcb","tags":["trace","width","current","ipc","pcb","copper","thermal"],"outputFeeds":[],"inputFrom":["voltage_divider","impedance_match"]},{"name":"ohms_law","version":"1.0.0","description":"Solves Ohm's Law and the power equation given any two of four electrical quantities: voltage (V), current (I), resistance (R), and power (P). Uses V=IR, P=VI, P=I^2R, and P=V^2/R to derive the missing two values. Fundamental for every circuit design task: sizing resistors, estimating current draw, checking power dissipation, and verifying component ratings. Chain into led_resistor for LED circuits or voltage_divider for bias networks.","category":"pcb","tags":["ohm","voltage","current","resistance","power","pcb","electronics","basic"],"outputFeeds":["led_resistor","voltage_divider","trace_width"],"inputFrom":["voltage_divider"]},{"name":"resistor_color_code","version":"1.0.0","description":"Decodes 4-band or 5-band resistor color codes into resistance value, tolerance, and min/max range. Accepts an ordered array of color names (left-to-right as printed on the resistor body). Supports standard EIA color codes including gold and silver multiplier/tolerance bands. Outputs the nominal resistance in ohms, a human-readable formatted value (e.g. '4.7kΩ'), tolerance percentage, and the min/max resistance range. Chain into ohms_law or led_resistor for circuit analysis.","category":"pcb","tags":["resistor","color","code","decoder","pcb","electronics","component"],"outputFeeds":["ohms_law","led_resistor"],"inputFrom":[]},{"name":"led_resistor","version":"1.0.0","description":"Calculates the current-limiting resistor for driving one or more LEDs in series from a DC supply. Computes the exact resistance from R = (Vsupply - n*Vf) / I, then selects the nearest E24 standard resistor value. Reports the actual current with the standard resistor, power dissipation, and voltage across the resistor. Supports series LED strings by specifying led_count. Validates that supply voltage exceeds total forward voltage. Chain from ohms_law for power budgeting or into trace_width for PCB layout.","category":"pcb","tags":["led","resistor","current","limiting","pcb","electronics"],"outputFeeds":["trace_width","ohms_law"],"inputFrom":["ohms_law","resistor_color_code"]},{"name":"timer_555","version":"1.0.0","description":"Calculates timing parameters for the ubiquitous NE555 / LM555 timer IC in astable (free-running oscillator) and monostable (one-shot pulse) modes. In astable mode, computes frequency, period, duty cycle, and HIGH/LOW durations from R1, R2, and C using f = 1.44 / ((R1 + 2·R2) · C). In monostable mode, computes pulse width from R and C using t = 1.1 · R · C. Standard 555 astable duty cycle is always >50%; for 50% duty cycle use a diode across R2. Useful for generating clock signals, PWM, delays, and debounce circuits. Chain from ohms_law for power calculations or resistor_color_code for component selection.","category":"pcb","tags":["555","timer","oscillator","astable","monostable","pulse","frequency","electronics"],"outputFeeds":["rc_filter","ohms_law","led_resistor"],"inputFrom":["ohms_law","resistor_color_code"]},{"name":"op_amp_gain","version":"1.0.0","description":"Calculate voltage gain and output for operational amplifier circuits in inverting, non-inverting, and differential configurations. For inverting: Av = -Rf/Ri with input impedance equal to Ri. For non-inverting: Av = 1 + Rf/Rg with very high input impedance. For differential: Av = Rf/Ri applied to (V1 - V2). Reports gain in linear and dB, output voltage when input is provided, input impedance, and phase inversion status. Ideal op-amp assumptions (infinite open-loop gain, zero input bias current). Chain from ohms_law for power budgeting or resistor_color_code for component selection.","category":"pcb","tags":["op-amp","amplifier","gain","inverting","non-inverting","differential","analog","pcb"],"outputFeeds":["ohms_law","trace_width"],"inputFrom":["ohms_law","resistor_color_code","voltage_divider"]},{"name":"capacitor_charge","version":"1.0.0","description":"Calculates RC capacitor charge timing, energy storage, and transient voltages. Given resistance, capacitance, supply voltage, and optional initial voltage, computes the RC time constant (τ = R×C), time to reach standard charge thresholds (63%, 86%, 95%, 99%), voltage at key time points, energy stored (E = ½CV²), and peak charging current. Optionally calculates time to reach a specific target voltage using t = -τ × ln((Vsupply - Vtarget) / (Vsupply - Vinitial)). Essential for timing circuits, power-on reset delays, debounce networks, and soft-start designs. Chain from rc_filter for frequency-domain analysis or timer_555 for oscillator timing.","category":"pcb","tags":["capacitor","charge","discharge","rc","time-constant","energy","transient","pcb"],"outputFeeds":["timer_555","ohms_law"],"inputFrom":["rc_filter","ohms_law","resistor_color_code"]},{"name":"pcb_via_current","version":"1.0.0","description":"Calculate PCB via current-carrying capacity using the IPC-2221 standard. A plated via is a hollow copper cylinder whose cross-sectional area is the annular ring of plating: A = pi * (D - t) * t, where D is the drill diameter and t is plating thickness. The IPC-2221 empirical formula I = k * dT^0.44 * A^0.725 (k=0.048) then gives the maximum current for a given temperature rise. Also computes via barrel resistance from copper resistivity (1.724e-6 ohm-cm) and barrel length (board thickness). When a target current is specified, returns how many parallel vias are needed. Essential for power planes, high-current paths, and thermal via arrays. Chain with trace_width to verify both trace and via can handle the same current.","category":"pcb","tags":["via","current","pcb","ipc","plating","thermal","power"],"outputFeeds":["trace_width.max_current_a"],"inputFrom":["trace_width.target_current_a","ohms_law.target_current_a"]},{"name":"power_supply_decoupling","version":"1.0.0","description":"Select bypass and bulk decoupling capacitors for IC power supply pins. Computes the target PDN (Power Distribution Network) impedance from supply current, voltage, and allowable ripple using Z_target = V_ripple / I_total. Recommends a ceramic bypass capacitor (high-frequency decoupling, placed closest to IC pins) and a bulk capacitor (low-frequency decoupling, near the regulator). Calculates the ceramic cap's self-resonant frequency assuming typical lead inductance, and checks whether ESR-induced ripple stays within limits. Essential for digital, analog, and mixed-signal PCB design. Chain with lc_resonance to verify the decoupling capacitor's resonant behavior, or with trace_width to size the power trace.","category":"pcb","tags":["decoupling","bypass","capacitor","pdn","power","supply","noise","ripple","pcb"],"outputFeeds":["lc_resonance.ceramic_cap_uf"],"inputFrom":["ohms_law.supply_current_ma"]},{"name":"log_calc","version":"1.0.0","description":"Compute logarithms of a positive number in any base. Returns the custom-base logarithm, natural logarithm (ln), common logarithm (log10), and binary logarithm (log2). Useful for signal processing (decibel calculations), information theory (entropy in bits), pH chemistry, and general scientific computation. Uses the change-of-base formula log_b(x) = ln(x) / ln(b). Feeds into exponent_calc for inverse operations and scientific_notation for order-of-magnitude analysis.","category":"general","tags":["logarithm","log","ln","log10","log2","math"],"outputFeeds":["exponent_calc.exponent","scientific_notation.value"],"inputFrom":["exponent_calc.result"]},{"name":"sig_figs","version":"1.0.0","description":"Count significant figures in a number and optionally round to N significant figures. Accepts the number as a string to preserve trailing zeros (e.g. '1.200' has 4 sig figs). Applies standard sig fig rules: leading zeros do not count, trailing zeros after a decimal point count, trailing zeros before a decimal point are treated as significant. Also returns the number in scientific notation. Essential for laboratory measurements, error analysis, and maintaining proper precision in chained calculations.","category":"general","tags":["significant-figures","sig-figs","precision","rounding","measurement"],"outputFeeds":["scientific_notation.value"],"inputFrom":[]},{"name":"scientific_notation","version":"1.0.0","description":"Convert any number to scientific notation and engineering notation. Returns the coefficient, exponent, a formatted string with Unicode superscripts (e.g. '3.14 × 10²'), and engineering notation where the exponent is a multiple of 3. Useful for expressing very large or very small values compactly, common in physics, electronics (picofarads, gigahertz), and astronomy. Accepts output from sig_figs and log_calc for precision-aware formatting.","category":"general","tags":["scientific-notation","engineering-notation","exponent","formatting"],"outputFeeds":[],"inputFrom":["sig_figs.scientific_notation","log_calc.log10"]},{"name":"percentage_calc","version":"1.0.0","description":"Calculate what percentage one number is of another. Given a value and a total, returns the percentage, decimal form, and simplified fraction. For example, 3 out of 4 yields 75%, 0.75, and '3/4'. Commonly used for test scores, survey results, financial ratios, completion rates, and unit conversions. Chain with percentage_increase to compare successive measurements or use with test_grade for academic scoring.","category":"general","tags":["percentage","fraction","ratio","proportion"],"outputFeeds":["percentage_increase.old_value"],"inputFrom":[]},{"name":"percentage_increase","version":"1.0.0","description":"Calculate the percentage change between an old value and a new value. Determines whether the change is an increase or decrease, the absolute change, and the percentage change. Essential for financial analysis (stock price changes, revenue growth), scientific measurements (before/ after experiments), performance benchmarks, and population statistics. A positive percentage indicates growth; negative indicates decline. Division by zero (old_value = 0) is handled gracefully.","category":"general","tags":["percentage","increase","decrease","change","growth","delta"],"outputFeeds":[],"inputFrom":["percentage_calc.percentage"]},{"name":"exponent_calc","version":"1.0.0","description":"Compute the result of raising a base to an exponent (base^exponent). Handles positive and negative exponents, fractional exponents, and zero. Returns the numeric result and a scientific notation string for very large or very small results. Useful for compound interest calculations, exponential growth/decay models, physics power laws, and combinatorics. The inverse of log_calc; chain with scientific_notation for formatted display of extreme values.","category":"general","tags":["exponent","power","exponential","math"],"outputFeeds":["scientific_notation.value","log_calc.value"],"inputFrom":["log_calc.result"]},{"name":"square_root","version":"1.0.0","description":"Compute the square root of a non-negative number. Returns the decimal result, whether the input is a perfect square, and a simplified radical form (e.g. '√12' simplifies to '2√3'). For integer inputs, factors are extracted from under the radical sign. Useful for geometry (diagonal/hypotenuse calculations), statistics (standard deviation from variance), signal processing (RMS values), and general algebra. Chain with pythagorean_theorem for triangle side calculations.","category":"general","tags":["square-root","radical","sqrt","math"],"outputFeeds":["pythagorean_theorem.a"],"inputFrom":["exponent_calc.result"]},{"name":"circumference","version":"1.0.0","description":"Calculate the circumference and area of a circle given either a radius or diameter. Provide one or both; if both are given, radius takes precedence. Returns circumference (C = 2πr), area (A = πr²), and both radius and diameter for completeness. Common in mechanical engineering (pulley systems, pipe sizing), electronics (antenna loop calculations, coil winding), civil engineering (manhole covers, circular foundations), and everyday measurement tasks.","category":"general","tags":["circumference","circle","area","radius","diameter","geometry"],"outputFeeds":[],"inputFrom":[]},{"name":"slope_calc","version":"1.0.0","description":"Calculate the slope, y-intercept, line equation, angle, and distance between two points in a 2D Cartesian plane. Given coordinates (x1, y1) and (x2, y2), computes slope (rise/run), y-intercept, the equation in slope-intercept form (y = mx + b), angle in degrees relative to the x-axis, and Euclidean distance. Handles vertical and horizontal lines as special cases. Useful for surveying, civil engineering grade calculations, linear regression visualization, and physics kinematics problems.","category":"general","tags":["slope","line","equation","angle","distance","geometry"],"outputFeeds":["pythagorean_theorem.a"],"inputFrom":[]},{"name":"pythagorean_theorem","version":"1.0.0","description":"Solve for any side of a right triangle using the Pythagorean theorem (a² + b² = c²). Provide any two of the three sides (a, b, c) and the missing side is computed. Also returns the triangle area (0.5 * a * b), perimeter, and confirms it is a right triangle. Side c is always the hypotenuse. Fundamental to surveying, construction (squaring corners), navigation (distance calculations), physics (vector decomposition), and 3D graphics. Chain with slope_calc for coordinate geometry or square_root for simplified radical answers.","category":"general","tags":["pythagorean","triangle","hypotenuse","right-triangle","geometry"],"outputFeeds":["slope_calc.x2","square_root.value"],"inputFrom":["slope_calc.distance","square_root.result"]},{"name":"p_value","version":"1.0.0","description":"Calculate the p-value for a z-score or t-statistic. Supports one-tailed (left or right) and two-tailed hypothesis tests using either the standard normal distribution or the Student's t-distribution when degrees of freedom are specified. Returns significance flags at the 0.01, 0.05, and 0.10 alpha levels. Essential for interpreting results from t-tests, z-tests, ANOVA post-hoc comparisons, and regression coefficients. Uses the Abramowitz & Stegun normal CDF approximation and regularized incomplete beta function for the t-distribution.","category":"general","tags":["p-value","statistics","hypothesis-testing","t-test","z-test","significance","normal-distribution","t-distribution"],"outputFeeds":["confidence_interval"],"inputFrom":[]},{"name":"confidence_interval","version":"1.0.0","description":"Calculate the confidence interval for a sample mean. Given a sample mean, sample size, standard deviation, and confidence level, computes the margin of error, lower and upper bounds, critical z-score, and standard error. Supports finite population correction (FPC) when a population size is provided, which narrows the interval for samples that are a large fraction of the population. Uses the Abramowitz & Stegun rational approximation for the inverse normal CDF to derive the critical z-value. Common in survey analysis, A/B testing, and quality control.","category":"general","tags":["confidence-interval","statistics","margin-of-error","standard-error","z-score","sampling","finite-population-correction"],"outputFeeds":[],"inputFrom":["p_value"]},{"name":"sales_tax","version":"1.0.0","description":"Calculates total cost including sales tax for a purchase. Given a unit price, tax rate percentage, and optional quantity, computes the subtotal (price times quantity), the tax amount rounded to two decimal places, and the final total. Useful for estimating purchase costs across US states and municipalities with different tax rates, comparing pre-tax and post-tax prices, and budgeting. Chain into salary_to_hourly to see how many work-hours a purchase represents.","category":"general","tags":["tax","sales","price","shopping","finance","calculator"],"outputFeeds":["salary_to_hourly"],"inputFrom":[]},{"name":"salary_to_hourly","version":"1.0.0","description":"Converts compensation between annual salary, monthly pay, weekly pay, and hourly wage. Accepts any of the four pay periods as input and derives all others. Uses configurable hours per week (default 40) and weeks per year (default 52). Daily rate assumes an 8-hour workday; monthly is annual divided by 12. Useful for comparing job offers quoted in different pay periods, freelance rate-setting, and budgeting. Chain from sales_tax to see how many hours a purchase costs.","category":"general","tags":["salary","hourly","wage","income","pay","finance","converter"],"outputFeeds":[],"inputFrom":["sales_tax"]},{"name":"loan_amortization","version":"1.0.0","description":"Computes a full loan amortization schedule given principal, annual interest rate, and term in months. Returns the fixed monthly payment, total interest, total payments, and a month-by-month breakdown of principal vs interest. Supports optional extra monthly payments — shows months saved and interest saved. Works for mortgages (30yr/15yr), auto loans, personal loans, and student loans. All currency-agnostic. Use with /run?page=1&page_size=12 to paginate the schedule array for context-friendly agent consumption.","category":"general","tags":["loan","mortgage","amortization","interest","finance","payment","debt"],"outputFeeds":[],"inputFrom":[]},{"name":"compound_interest","version":"1.0.0","description":"Calculates compound interest growth over time using the formula A = P(1 + r/n)^(nt). Given a principal, annual rate, duration in years, and compounding frequency, returns the future value, total interest earned, effective annual rate (APY), and a year-by-year growth schedule. Supports optional recurring monthly contributions for savings projections. Works for savings accounts, CDs, investment returns, and retirement planning. Currency-agnostic.","category":"general","tags":["compound","interest","investment","savings","finance","growth","apy"],"outputFeeds":[],"inputFrom":[]},{"name":"test_grade","version":"1.0.0","description":"Calculates a test or exam grade from the number of correct answers and total questions. Returns the percentage score, letter grade, points missed, and GPA points. Supports US grading (A/B/C/D/F with 4.0 GPA scale), UK grading (First/2:1/2:2/Third/Fail), and percentage-only mode. US thresholds: A>=90, B>=80, C>=70, D>=60, F<60. UK thresholds: First>=70, 2:1>=60, 2:2>=50, Third>=40, Fail<40. Useful for students checking scores and teachers computing class statistics.","category":"general","tags":["grade","test","exam","score","gpa","education","percentage"],"outputFeeds":[],"inputFrom":[]},{"name":"square_footage","version":"1.0.0","description":"Calculates area and perimeter for common shapes — rectangle, circle, or triangle — in both imperial and metric units. Returns area in square feet, square meters, and acres, plus perimeter in feet and meters. For rectangles: area = length * width, perimeter = 2*(length + width). For circles: area = pi * r^2, perimeter = 2 * pi * r. For triangles: area = 0.5 * base * height, perimeter approximated as base + height + sqrt(base^2 + height^2). Useful for real estate, flooring, landscaping, and construction estimates.","category":"general","tags":["area","square footage","sqft","rectangle","circle","triangle","real estate","measurement"],"outputFeeds":[],"inputFrom":[]},{"name":"unit_convert","version":"1.0.0","description":"Convert between units across 10 categories: length (m, km, mi, ft, in, yd, nmi), mass (kg, lb, oz, g, ton), volume (l, gal, ml, cup, fl_oz), area (m2, ft2, acre, hectare), speed (mps, kph, mph, knot), pressure (pa, psi, bar, atm, mmhg), energy (j, kwh, btu, cal, wh), data (b, kb, mb, gb, tb), time (s, ms, min, hr, day, year), and temperature (c, f, k). Accepts any value with source and target unit abbreviations. Returns the converted result with the formula used.","category":"general","tags":["unit","convert","conversion","metric","imperial","temperature","length","mass","volume"],"outputFeeds":[],"inputFrom":[]},{"name":"hex_converter","version":"1.0.0","description":"Convert numbers between hexadecimal, binary, decimal, and octal bases. Accepts any base as input (prefix 0x for hex, 0b for binary, 0o for octal, or plain decimal) and returns all four representations simultaneously. Also reports bit width, byte count, ASCII character (if printable), and signed interpretations (8-bit, 16-bit, 32-bit two's complement). Essential for embedded programming, register debugging, network protocol analysis, and color code conversion. Example: 0xFF → decimal 255, binary 0b11111111, octal 0o377, 8 bits, 1 byte.","category":"general","tags":["hex","binary","decimal","octal","convert","base","ascii","bits","bytes"],"outputFeeds":[],"inputFrom":[]},{"name":"timestamp_converter","version":"1.0.0","description":"Convert between Unix timestamps and human-readable date/time formats. Accepts Unix epoch (in seconds or milliseconds), ISO 8601 strings, or 'now' for the current time. Returns both Unix seconds and milliseconds, ISO 8601 UTC string, date and time components, day of the week, relative time description ('2 hours ago'), and past/future indicator. Auto-detects whether a numeric input is seconds or milliseconds based on magnitude. Essential for debugging logs, API timestamps, cron scheduling, and time zone conversions.","category":"general","tags":["timestamp","unix","epoch","iso-8601","date","time","convert","utc"],"outputFeeds":[],"inputFrom":[]},{"name":"bmi_calculator","version":"1.0.0","description":"Calculate Body Mass Index (BMI) from weight and height using the WHO standard formula. Supports metric (kg/cm) and imperial (lbs/inches) units. Returns the BMI value, WHO classification (Underweight, Normal, Overweight, Obese Class I-III), and the healthy weight range for the given height. Formula: BMI = weight_kg / (height_m)^2. Useful for health screening, fitness planning, and clinical intake forms.","category":"general","tags":["bmi","health","weight","body-mass-index","wellness"],"outputFeeds":[],"inputFrom":[]},{"name":"tip_calculator","version":"1.0.0","description":"Calculate tip and split a restaurant bill among multiple people. Given a bill amount, tip percentage, and number of diners, returns the tip amount, total with tip, per-person share, and effective tip percentage. Supports rounding up to the nearest whole number for convenience. Defaults to 18% tip for 1 person. Currency-agnostic — works with any monetary unit.","category":"general","tags":["tip","gratuity","restaurant","bill","split","finance"],"outputFeeds":[],"inputFrom":[]},{"name":"date_difference","version":"1.0.0","description":"Calculate the difference between two dates in days, weeks, months, years, and business days. Accepts dates in YYYY-MM-DD format. Returns the absolute difference (order doesn't matter) plus a flag indicating whether the end date is in the future relative to start. Business days count only Monday through Friday. Useful for project planning, deadline tracking, contract duration calculations, and age computations.","category":"general","tags":["date","time","difference","days","calendar","business-days"],"outputFeeds":[],"inputFrom":[]}]