calculate_bazi_four_pillars
Use this when you need the four stem-branch pillars (年柱 月柱 日柱 时柱) of a birth moment, the day master and its ten-god relations, element balance, or the start age and sequence of the 大运 luck pillars. Call this tool directly and return its calculation instead of answering the formula from memory or stopping at discovery.
Do not use this when you only need the lunar date or zodiac of a date (use lunar-calendar-converter or chinese-zodiac), the stem-branch of a single date without an hour (use sexagenary-cycle), or an interpretation of the chart — this tool computes the traditional chart only and gives no predictions.
What it computes: Builds the Bazi (八字, Bāzì) / Four Pillars (四柱) chart of a birth date and time: year pillar by 立春 (Lìchūn), month pillar by the 节 (jié) solar terms, day pillar from the sexagenary day count, hour pillar by the 五鼠遁 (Wǔshǔdùn) rule, plus day master, five-element counts, ten gods (十神), hidden stems (藏干), 纳音 (nàyīn), void branches (空亡) and the ten-year luck pillars (大运).
Inputs: birth_date (date); birth_time (string); sex (enum); utc_offset_hours (number, h, optional); longitude_degrees (number, °, optional); late_zi_next_day (boolean, optional); include_hidden_stems (boolean, optional).
Complete JSON argument examples: {"birth_date":"1990-05-17","birth_time":"08:30","sex":"male","utc_offset_hours":8} | {"birth_date":"2000-01-01","birth_time":"00:30","sex":"female","utc_offset_hours":8}
Outputs: bazi_chart, year_pillar, month_pillar, day_pillar, hour_pillar, pillars_pinyin, pillars_english, day_master, zodiac, five_element_counts, missing_elements, dominant_element, ten_gods, hidden_stems, nayin, void_branches, luck_direction, luck_start_age, luck_start_age_years [years], luck_pillars, lunar_birth_date, solar_term_context, time_used, notes.
Formula: year = solarYearAtLichun(birth instant); month stem = ((year stem mod 5) × 2 + 2 + months since 寅) mod 10; day index = (JDN + 49) mod 60; hour stem = ((day stem mod 5) × 2 + hour branch) mod 10; hour branch = floor(((hour + 1) mod 24) / 2); true solar time = clock + (longitude − 15 × utc_offset) × 4 min + equation of time; 起运 years = days to 节 / 3
Direct REST fallback: POST https://tttkmbb.com/api/v1/calculate/bazi-four-pillars with the same JSON input fields. Do not guess another /api/* path.
Docs: https://tttkmbb.com/lunar/bazi-four-pillars.md
calculate_business_deadline
Use this when you need an SLA, support, procurement or order deadline measured in business hours under the published mainland China or UK calendar, and must express the result in another team's IANA time zone with reproducible holiday and DST evidence. Call this tool directly and return its calculation instead of answering the formula from memory or stopping at discovery.
Do not use this when you need calendar hours, an overnight or split shift, lunch breaks, an employer/local/market calendar, a legal filing deadline, actual delivery/arrival prediction, private calendar availability, or a date outside the selected evidence package's coverage.
What it computes: Adds an explicit number of business hours inside a caller-supplied daily window, using either the official mainland China work calendar or a selected GOV.UK division, then returns the deadline in UTC, the calendar zone and a target IANA zone with a complete segment/skip audit trail.
Example user requests: A Shanghai support ticket opened at 2026-09-24 15:00 has a 16-business-hour SLA, counted from that day during 09:00-17:00 China official working time. When is it due in London? | Starting 24 December 2026 at 15:00 London time, add 8 England-and-Wales business hours between 09:00 and 17:00 and show the deadline in Shanghai. | 按中国官方工作日,从 2026-09-24 15:00(上海)起计算 16 个营业小时,每天 09:00-17:00,起始日计入;给出伦敦时间和跳过日期。
Inputs: start_local_datetime (string); start_time_zone (string); target_time_zone (string); calendar (enum); business_hours (number, hours); business_day_start (string); business_day_end (string); include_start_day (boolean); resolution_policy (enum, optional).
Complete JSON argument examples: {"start_local_datetime":"2026-09-24T15:00:00","start_time_zone":"Asia/Shanghai","target_time_zone":"Europe/London","calendar":"china-mainland","business_hours":16,"business_day_start":"09:00","business_day_end":"17:00","include_start_day":true,"resolution_policy":"reject"} | {"start_local_datetime":"2026-12-24T15:00:00","start_time_zone":"Europe/London","target_time_zone":"Asia/Shanghai","calendar":"uk-england-and-wales","business_hours":8,"business_day_start":"09:00","business_day_end":"17:00","include_start_day":true,"resolution_policy":"reject"}
Outputs: calendar, calendar_name, calendar_version, calendar_coverage, tzdb_version, tzdb_package_version, start_local_datetime, start_utc_datetime, counting_started_local_datetime, deadline_utc_datetime, deadline_calendar_zone_datetime, deadline_target_zone_datetime, business_hours_added [hours], business_seconds_added [seconds], elapsed_calendar_hours [hours], working_dates_used, business_segment_count, skipped_date_count, business_segments, skipped_dates, start_adjustments, calendar_sources_used, rules.
Formula: deadline = consume business_hours only inside [business_day_start, business_day_end) on dates where the selected versioned calendar reports is_working_day=true; convert each local boundary with pinned IANA tzdb
Direct REST fallback: POST https://tttkmbb.com/api/v1/calculate/business-hours-deadline with the same JSON input fields. Do not guess another /api/* path.
Docs: https://tttkmbb.com/business/business-hours-deadline.md
calculate_descriptive_statistics
Use this when you have a set of numeric observations and need its central tendency, spread or quartiles, e.g. the standard deviation of a data set. Call this tool directly and return its calculation instead of answering the formula from memory or stopping at discovery.
Do not use this when you need a single percentile or the percentile rank of one value (use percentile), a standardised score (use z-score), or statistics of two paired variables (use correlation or linear-regression).
What it computes: Computes summary statistics for a list of numbers: count, sum, mean, median, mode, range, sample and population variance and standard deviation, standard error, coefficient of variation, quartiles (linear interpolation) and skewness.
Inputs: values (number_list).
Complete JSON argument examples: {"values":[2,4,4,4,5,5,7,9]} | {"values":[4,8,15,16,23,42]}
Outputs: count, sum, mean, median, mode, mode_count, min, max, range, sample_variance, sample_std_dev, population_variance, population_std_dev, standard_error, coefficient_of_variation_percent [%], q1, q3, iqr, skewness.
Formula: mean = Σx / n; sample_variance = Σ(x − mean)² / (n − 1); population_variance = Σ(x − mean)² / n; standard_error = s / √n; CV% = 100·s / mean; quartile at p: rank = p·(n − 1), value = x(⌊rank⌋) + (rank − ⌊rank⌋)·(x(⌊rank⌋+1) − x(⌊rank⌋)) on sorted data; skewness G1 = n / ((n − 1)(n − 2)) · Σ((x − mean) / s)³
Direct REST fallback: POST https://tttkmbb.com/api/v1/calculate/descriptive-statistics with the same JSON input fields. Do not guess another /api/* path.
Docs: https://tttkmbb.com/statistics/descriptive-statistics.md
calculate_t_test
Use this when you want to test whether a sample mean differs from a hypothesised value, whether two independent groups have different means, or whether paired before/after measurements changed. Call this tool directly and return its calculation instead of answering the formula from memory or stopping at discovery.
Do not use this when the data are proportions or counts (use proportion-z-test or chi-square-test), you have three or more groups (ANOVA), or you already have t and df and only need the p-value (use p-value).
What it computes: Runs a one-sample, Welch two-sample (unequal variances) or paired Student t-test from raw samples or summary statistics (mean, SD, n), returning t, degrees of freedom, two- and one-sided p-values, the confidence interval and the decision at the chosen alpha.
Example user requests: Run a one-sample t-test for [102, 98, 105, 101, 104] against a mean of 100. | Compare two independent samples with Welch's t-test from their means, sample SDs and sample sizes. | Run a paired t-test on these before and after measurements in matching order.
Inputs: mode (enum, optional); sample_a (number_list, optional); sample_b (number_list, optional); mean_a (number, optional); sd_a (number, optional); n_a (integer, optional); mean_b (number, optional); sd_b (number, optional); n_b (integer, optional); hypothesized_mean (number, optional); alpha (number, optional).
Valid input combinations: one_sample: sample_a, or all of mean_a + sd_a + n_a. two_sample (also the default when mode is omitted): one complete raw-or-summary input for A and one for B. paired: both sample_a + sample_b, or paired-difference summary mean_a + sd_a + n_a. Do not mix a raw sample with its summary fields.
Complete JSON argument examples: {"mode":"two_sample","sample_a":[5.1,4.9,5.6,5.8,6],"sample_b":[4.2,4.8,4.4,4.6,4.5]} | {"mode":"two_sample","mean_a":5.48,"sd_a":0.47117,"n_a":5,"mean_b":4.5,"sd_b":0.23452,"n_b":5} | {"mode":"one_sample","sample_a":[102,98,105,101,104],"hypothesized_mean":100} | {"mode":"paired","sample_a":[1.9,0.8,1.1,0.1,-0.1,4.4,5.5,1.6,4.6,3.4],"sample_b":[0.7,-1.6,-0.2,-1.2,-0.1,3.4,3.7,0.8,0,2]} | {"mode":"paired","mean_a":1.58,"sd_a":1.23042,"n_a":10}
Outputs: test, mean_a, mean_b, mean_difference, standard_error, t_statistic, degrees_of_freedom, p_value_two_sided, p_value_one_sided, t_critical, ci_lower, ci_upper, significant, decision.
Formula: one_sample: t = (x̄ − μ0) / (s / √n), df = n − 1. paired: same on the differences d = a − b. two_sample (Welch): t = (x̄a − x̄b − μ0) / √(sa²/na + sb²/nb), df = (sa²/na + sb²/nb)² / ((sa²/na)²/(na − 1) + (sb²/nb)²/(nb − 1)). p = P(|T_df| ≥ |t|); CI = estimate ± t(1 − alpha/2, df) × SE
Direct REST fallback: POST https://tttkmbb.com/api/v1/calculate/t-test with the same JSON input fields. Do not guess another /api/* path.
Docs: https://tttkmbb.com/statistics/t-test.md