Skip to main content
Glama

Calculate Bazi Chart / 八字排盤

calculate_bazi_chart
Read-onlyIdempotent

Use this when the user wants a Four Pillars birth chart and has explicitly supplied the birth date, local time, latitude, longitude, and historical UTC offset. Applies True Solar Time correction. Do not use this to infer missing birth details, daylight-saving rules, or personalized guidance for a reading date. Use only with the subject’s permission. / 當使用者要建立四柱八字命盤,並已明確提供出生日期、當地時間、緯度、經度與當時 UTC 時差時使用;計算會校正真太陽時。請勿用來推測缺少的出生資料、夏令時間規則,或指定日期的個人化指引。僅在獲得當事人同意時使用出生資料。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
localeNoResponse display preference; structured technical values include both languages / 回應語言偏好;結構化術語同時包含中英文en
latitudeYesBirth latitude in decimal degrees / 出生地緯度(十進位度數)
timezoneYesUTC offset in hours at the birth location and date / 出生地與出生日期的 UTC 小時時差
longitudeYesBirth longitude in decimal degrees; used for True Solar Time / 出生地經度,用於真太陽時校正
birth_dateYesBirth date in YYYY-MM-DD format / YYYY-MM-DD 格式的出生日期
birth_timeYesLocal birth time in 24-hour HH:mm format / 24 小時制的出生時間 HH:mm

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
toolYes
localeYes
disclaimerYes
generated_atYes
canonical_urlYes
deterministicYes
schema_versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changed
    • removedInput schema / properties / birth_time / default
      Removed value: -"12:00"
    • changedInput schema / required
      Previous value: -[
      -  "birth_date",
      -  "latitude",
      -  "longitude",
      -  "timezone"
      -]New value: +[
      +  "birth_date",
      +  "birth_time",
      +  "latitude",
      +  "longitude",
      +  "timezone"
      +]
    • addedOutput schema / properties / canonical_url / format
      Added value: +"uri"
    • changedOutput schema / properties / data / additionalProperties
      Previous value: -{}New value: +false
    • addedOutput schema / properties / data / properties
      Added value: +{
      +  "birth_input": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "date": {
      +        "type": "string"
      +      },
      +      "latitude": {
      +        "type": "number"
      +      },
      +      "longitude": {
      +        "type": "number"
      +      },
      +      "time": {
      +        "type": "string"
      +      },
      +      "timezone_offset_hours": {
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "date",
      +      "time",
      +      "latitude",
      +      "longitude",
      +      "timezone_offset_hours"
      +    ],
      +    "type": "object"
      +  },
      +  "calculation_method": {
      +    "type": "string"
      +  },
      +  "chart": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "day": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "earthly_branch": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "en": {
      +                "type": "string"
      +              },
      +              "zh": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "en",
      +              "zh"
      +            ],
      +            "type": "object"
      +          },
      +          "five_elements": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "en": {
      +                "type": "string"
      +              },
      +              "zh": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "en",
      +              "zh"
      +            ],
      +            "type": "object"
      +          },
      +          "gan_zhi": {
      +            "type": "string"
      +          },
      +          "heavenly_stem": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "en": {
      +                "type": "string"
      +              },
      +              "zh": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "en",
      +              "zh"
      +            ],
      +            "type": "object"
      +          },
      +          "na_yin": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "en": {
      +                "type": "string"
      +              },
      +              "zh": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "en",
      +              "zh"
      +            ],
      +            "type": "object"
      +          }
      +        },
      +        "required": [
      +          "heavenly_stem",
      +          "earthly_branch",
      +          "gan_zhi",
      +          "five_elements",
      +          "na_yin"
      +        ],
      +        "type": "object"
      +      },
      +      "hour": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "earthly_branch": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "en": {
      +                "type": "string"
      +              },
      +              "zh": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "en",
      +              "zh"
      +            ],
      +            "type": "object"
      +          },
      +          "five_elements": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "en": {
      +                "type": "string"
      +              },
      +              "zh": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "en",
      +              "zh"
      +            ],
      +            "type": "object"
      +          },
      +          "gan_zhi": {
      +            "type": "string"
      +          },
      +          "heavenly_stem": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "en": {
      +                "type": "string"
      +              },
      +              "zh": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "en",
      +              "zh"
      +            ],
      +            "type": "object"
      +          },
      +          "na_yin": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "en": {
      +                "type": "string"
      +              },
      +              "zh": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "en",
      +              "zh"
      +            ],
      +            "type": "object"
      +          }
      +        },
      +        "required": [
      +          "heavenly_stem",
      +          "earthly_branch",
      +          "gan_zhi",
      +          "five_elements",
      +          "na_yin"
      +        ],
      +        "type": "object"
      +      },
      +      "month": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "earthly_branch": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "en": {
      +                "type": "string"
      +              },
      +              "zh": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "en",
      +              "zh"
      +            ],
      +            "type": "object"
      +          },
      +          "five_elements": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "en": {
      +                "type": "string"
      +              },
      +              "zh": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "en",
      +              "zh"
      +            ],
      +            "type": "object"
      +          },
      +          "gan_zhi": {
      +            "type": "string"
      +          },
      +          "heavenly_stem": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "en": {
      +                "type": "string"
      +              },
      +              "zh": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "en",
      +              "zh"
      +            ],
      +            "type": "object"
      +          },
      +          "na_yin": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "en": {
      +                "type": "string"
      +              },
      +              "zh": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "en",
      +              "zh"
      +            ],
      +            "type": "object"
      +          }
      +        },
      +        "required": [
      +          "heavenly_stem",
      +          "earthly_branch",
      +          "gan_zhi",
      +          "five_elements",
      +          "na_yin"
      +        ],
      +        "type": "object"
      +      },
      +      "solar_time": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "equation_of_time_minutes": {
      +            "type": "number"
      +          },
      +          "longitude_correction_minutes": {
      +            "type": "number"
      +          },
      +          "original_local_time": {
      +            "type": "string"
      +          },
      +          "timezone_offset_hours": {
      +            "type": "number"
      +          },
      +          "total_correction_minutes": {
      +            "type": "number"
      +          },
      +          "true_solar_local_time": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "original_local_time",
      +          "true_solar_local_time",
      +          "timezone_offset_hours",
      +          "longitude_correction_minutes",
      +          "equation_of_time_minutes",
      +          "total_correction_minutes"
      +        ],
      +        "type": "object"
      +      },
      +      "year": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "earthly_branch": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "en": {
      +                "type": "string"
      +              },
      +              "zh": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "en",
      +              "zh"
      +            ],
      +            "type": "object"
      +          },
      +          "five_elements": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "en": {
      +                "type": "string"
      +              },
      +              "zh": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "en",
      +              "zh"
      +            ],
      +            "type": "object"
      +          },
      +          "gan_zhi": {
      +            "type": "string"
      +          },
      +          "heavenly_stem": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "en": {
      +                "type": "string"
      +              },
      +              "zh": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "en",
      +              "zh"
      +            ],
      +            "type": "object"
      +          },
      +          "na_yin": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "en": {
      +                "type": "string"
      +              },
      +              "zh": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "en",
      +              "zh"
      +            ],
      +            "type": "object"
      +          }
      +        },
      +        "required": [
      +          "heavenly_stem",
      +          "earthly_branch",
      +          "gan_zhi",
      +          "five_elements",
      +          "na_yin"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "year",
      +      "month",
      +      "day",
      +      "hour",
      +      "solar_time"
      +    ],
      +    "type": "object"
      +  }
      +}
    • removedOutput schema / properties / data / propertyNames
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / data / required
      Added value: +[
      +  "birth_input",
      +  "calculation_method",
      +  "chart"
      +]
    • addedOutput schema / properties / generated_at / format
      Added value: +"date-time"
    • addedOutput schema / properties / generated_at / pattern
      Added value: +"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
    • changedOutput schema / properties / schema_version / const
      Previous value: -"2026-08-20"New value: +"2026-09-07"
    • addedOutput schema / properties / tool / const
      Added value: +"calculate_bazi_chart"
  2. First observed

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish read-only/idempotent safety, so the description adds value by disclosing the True Solar Time correction and explicit-consent requirement. It also clarifies non-behaviors (no inference of missing details or DST rules), improving expectation setting.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Compact and front-loaded with use-case and constraints; bilingual phrasing adds no redundant filler. Both the English and Chinese sections carry the same critical information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, the description appropriately focuses on triggers, constraints, and consent rather than return values. It covers the necessary decision-making context for safe and accurate invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers all parameters; description enhances semantics by explaining how latitude/longitude/timezone contribute to True Solar Time and emphasizing the historical UTC-offset requirement. This helps the agent map natural-language inputs to the correct parameter fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states a specific calculation operation (Four Pillars birth chart) with explicit prerequisites. Differentiates from sibling daily almanac/guidance tools by focusing on natal chart generation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit when-to-use conditions (user requests a birth chart and supplies complete birth details) and when-not-to-use conditions (missing details, DST inference, reading-date guidance). The permission requirement further constrains appropriate invocation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources