generate_horoscope
Generate a complete Tu Vi horoscope chart from birth details (date, time, gender) with optional visual PNG rendering for instant astrological analysis.
Instructions
Generate a full Tu Vi (Vietnamese horoscope) chart from raw birth details, with optional high-quality visual chart image rendering.
Purpose and Comparison
Use this tool when you want to compute and inspect an astrological birth chart from scratch for arbitrary birth details.
Side Effects, Auth, and Rate Limits
Side Effects: If
generate_imageisTrue, it renders a high-quality PNG chart layout and saves it to a temporary path on the local filesystem, returning the file path. It is read-only and stateless.Auth/Rate Limits: Runs entirely locally. No authentication or external rate limits apply.
Prerequisites
The date parameters must form a valid date in either the Solar or Lunar calendar.
Parameter Guidelines & Interactions
name: Name of the subject (default: "Khách").day: Day of birth (1-31).month: Month of birth (1-12).year: Year of birth (e.g., 1995).hour_val: Hour of birth. Accepts string formats like "14:30", "Ngọ" (Earthly Branch name), or numeric branch index (1-12, where 1=Tý, 12=Hợi) (default: "12:00"). Interpreted as the LOCAL CIVIL TIME at the birthplace — do not convert to Vietnam time unless that is the intended civil-tz reference (seetimezonebelow).gender_val: Gender of the subject. Accepts "Nam", "Nữ", "male", "female" (case-insensitive, default: "Nam").is_solar: Set toTrue(default) if the birth date is Solar (Dương lịch). Set toFalseif it is Lunar (Âm lịch).current_year: Year to calculate transit stars/Vận Hạn for (default: system current year, e.g., 2026).generate_image: Set toTrue(default) to render and return a visual PNG chart along with raw data. Set toFalseto return only raw data.timezone: Numeric UTC offset for the civil timezone at the birthplace (default 7 for ICT/Vietnam). Accepts an integer (e.g.7,-5) or anh:30string (e.g."7:30","-5:30"). Other minutes values (e.g."7:15") and out-of-range values are rejected. Only the boundary-rounding of astronomical events (lunar day, tiết-khí, Đông chí) is affected — the civil hour branch (chi giờ) is always derived fromhour_val.
Output Schema and Error Conditions
If
generate_imageisTrue: Returns a list[Image, chart_data]whereImageis a FastMCP Image object pointing to the generated PNG file on disk, andchart_datais a dictionary containing structured chart details (demographics, houses, stars).If
generate_imageisFalse: Returns only thechart_datadictionary.Structure of
chart_data:thien_ban: Dict containing calculated demographics, pillars/Can-Chi (year, month, day, hour), element (Hành Cục), destiny (Bản Mệnh), etc.dia_ban: List of 12 dicts, each representing an astrological house (cung), includingcung_so(1-12),cung_ten(name),cung_chu(domain),sao(list of stars),quan_he_hinh_hoc(static 100% geometric relationships:xung_chieu,tam_hop,nhi_hop,giap_cung), and optional transit/Hạn keys.
Errors: Returns an error dictionary
{"error": "error_message"}if calculations fail (e.g. invalid date formats, out-of-range birth years, invalid timezone).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| day | No | ||
| name | No | Khách | |
| year | No | ||
| month | No | ||
| hour_val | No | 12:00 | |
| is_solar | No | ||
| timezone | No | ||
| gender_val | No | Nam | |
| current_year | No | ||
| generate_image | No |