Skip to main content
Glama

Chinese Astrology MCP Server by RoxyAPI

Calculate BaZi compatibility - Four Pillars matchmaking API

post_chinese_astrology_bazi_compatibility
Read-only

Compare two BaZi charts pillar by pillar, the Chinese astrology reading of how two people match. Returns both resolved charts, how the two Day Masters stand to each other on the five-phase cycle, and every combination, clash, harm and punishment that crosses between them, each naming the two positions it joins. A tallied score summarises the balance and the interaction list behind it is returned in full, so a caller that disagrees with the weighting can recompute its own. Built for matchmaking products, relationship features, and agents that need a defensible two-chart reading.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
langNoResponse language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English.en
compactNoSet true for the same data in a compact shape: arrays of same-shaped objects arrive columnar as {"__cols":[names],"__rows":[[values]]}. Lossless, typically 40 to 52 percent fewer tokens.
personAYesBirth moment of the first person. Each subject carries its own school switches, so two charts built under different conventions can still be compared.
personBYesBirth moment of the second person.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
scoreYes
personAYes
personBYes
summaryYes
interactionsYes
harmoniousCountYes
challengingCountYes
dayMasterRelationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / personA / properties / hourClock / description
      Previous value: -"Which clock the HOUR branch is read from. \"clock\" is civil time exactly as a birth certificate records it, which is what most calculators use and the default here. \"local-mean\" shifts to the mean sun over the birth longitude, a correction of up to 59 minutes at the edge of a wide time zone. \"solar\" adds the equation of time on top of that, up to a further 16 minutes. Both non-civil options need \"longitude\" in the request and return 400 without it."New value: +"Which clock the day boundary and the hour branch are read from, so a correction that carries a birth across midnight moves the day pillar with the hour. \"clock\" is civil time exactly as a birth certificate records it, which is what most calculators use and the default here. \"local-mean\" shifts to the mean sun over the birth longitude, a correction of up to 59 minutes at the edge of a wide time zone. \"solar\" adds the equation of time on top of that, up to a further 16 minutes. Both non-civil options need \"longitude\" in the request and return 400 without it."
    • changedInput schema / properties / personB / properties / hourClock / description
      Previous value: -"Which clock the HOUR branch is read from. \"clock\" is civil time exactly as a birth certificate records it, which is what most calculators use and the default here. \"local-mean\" shifts to the mean sun over the birth longitude, a correction of up to 59 minutes at the edge of a wide time zone. \"solar\" adds the equation of time on top of that, up to a further 16 minutes. Both non-civil options need \"longitude\" in the request and return 400 without it."New value: +"Which clock the day boundary and the hour branch are read from, so a correction that carries a birth across midnight moves the day pillar with the hour. \"clock\" is civil time exactly as a birth certificate records it, which is what most calculators use and the default here. \"local-mean\" shifts to the mean sun over the birth longitude, a correction of up to 59 minutes at the edge of a wide time zone. \"solar\" adds the equation of time on top of that, up to a further 16 minutes. Both non-civil options need \"longitude\" in the request and return 400 without it."
  2. Changed2 schema fields changed
    • addedOutput schema / properties / personA / properties / pillars / items / properties / naYinElementLocalized
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / personB / properties / pillars / items / properties / naYinElementLocalized
      Added value: +{
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "challengingCount": {
      +      "type": "number"
      +    },
      +    "dayMasterRelation": {
      +      "type": "string"
      +    },
      +    "harmoniousCount": {
      +      "type": "number"
      +    },
      +    "interactions": {
      +      "items": {
      +        "properties": {
      +          "chinese": {
      +            "type": "string"
      +          },
      +          "complete": {
      +            "type": "boolean"
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "meaning": {
      +            "type": "string"
      +          },
      +          "members": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "pinyin": {
      +            "type": "string"
      +          },
      +          "positions": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "quality": {
      +            "type": "string"
      +          },
      +          "transformsTo": {
      +            "type": "string"
      +          },
      +          "type": {
      +            "type": "string"
      +          },
      +          "variety": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "id",
      +          "chinese",
      +          "pinyin",
      +          "quality",
      +          "positions",
      +          "members",
      +          "meaning"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "personA": {
      +      "properties": {
      +        "conventions": {
      +          "properties": {
      +            "dayBoundary": {
      +              "enum": [
      +                "split-zi",
      +                "midnight",
      +                "early-zi"
      +              ],
      +              "type": "string"
      +            },
      +            "hourClock": {
      +              "enum": [
      +                "clock",
      +                "local-mean",
      +                "solar"
      +              ],
      +              "type": "string"
      +            },
      +            "yearBoundary": {
      +              "enum": [
      +                "li-chun",
      +                "lunar-new-year"
      +              ],
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "dayBoundary",
      +            "yearBoundary",
      +            "hourClock"
      +          ],
      +          "type": "object"
      +        },
      +        "dayMaster": {
      +          "properties": {
      +            "chinese": {
      +              "type": "string"
      +            },
      +            "element": {
      +              "type": "string"
      +            },
      +            "elementLocalized": {
      +              "type": "string"
      +            },
      +            "nature": {
      +              "type": "string"
      +            },
      +            "pinyin": {
      +              "type": "string"
      +            },
      +            "polarity": {
      +              "type": "string"
      +            },
      +            "stem": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "stem",
      +            "chinese",
      +            "pinyin",
      +            "element",
      +            "polarity",
      +            "nature"
      +          ],
      +          "type": "object"
      +        },
      +        "pillars": {
      +          "items": {
      +            "properties": {
      +              "branch": {
      +                "properties": {
      +                  "animal": {
      +                    "type": "string"
      +                  },
      +                  "animalLocalized": {
      +                    "type": "string"
      +                  },
      +                  "chinese": {
      +                    "type": "string"
      +                  },
      +                  "element": {
      +                    "type": "string"
      +                  },
      +                  "elementLocalized": {
      +                    "type": "string"
      +                  },
      +                  "id": {
      +                    "type": "string"
      +                  },
      +                  "pinyin": {
      +                    "type": "string"
      +                  },
      +                  "polarity": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "id",
      +                  "chinese",
      +                  "pinyin",
      +                  "animal",
      +                  "element",
      +                  "polarity"
      +                ],
      +                "type": "object"
      +              },
      +              "hiddenStems": {
      +                "items": {
      +                  "properties": {
      +                    "role": {
      +                      "type": "string"
      +                    },
      +                    "stem": {
      +                      "properties": {
      +                        "chinese": {
      +                          "type": "string"
      +                        },
      +                        "element": {
      +                          "type": "string"
      +                        },
      +                        "elementLocalized": {
      +                          "type": "string"
      +                        },
      +                        "id": {
      +                          "type": "string"
      +                        },
      +                        "pinyin": {
      +                          "type": "string"
      +                        },
      +                        "polarity": {
      +                          "type": "string"
      +                        }
      +                      },
      +                      "required": [
      +                        "id",
      +                        "chinese",
      +                        "pinyin",
      +                        "element",
      +                        "polarity"
      +                      ],
      +                      "type": "object"
      +                    },
      +                    "tenGod": {
      +                      "properties": {
      +                        "category": {
      +                          "type": "string"
      +                        },
      +                        "chinese": {
      +                          "type": "string"
      +                        },
      +                        "id": {
      +                          "type": "string"
      +                        },
      +                        "keynote": {
      +                          "type": "string"
      +                        },
      +                        "name": {
      +                          "type": "string"
      +                        },
      +                        "nameLocalized": {
      +                          "type": "string"
      +                        },
      +                        "pinyin": {
      +                          "type": "string"
      +                        }
      +                      },
      +                      "required": [
      +                        "id",
      +                        "name",
      +                        "chinese",
      +                        "pinyin",
      +                        "category",
      +                        "keynote"
      +                      ],
      +                      "type": "object"
      +                    }
      +                  },
      +                  "required": [
      +                    "stem",
      +                    "role",
      +                    "tenGod"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              "id": {
      +                "type": "string"
      +              },
      +              "naYin": {
      +                "type": "string"
      +              },
      +              "naYinChinese": {
      +                "type": "string"
      +              },
      +              "naYinElement": {
      +                "type": "string"
      +              },
      +              "number": {
      +                "type": "number"
      +              },
      +              "position": {
      +                "type": "string"
      +              },
      +              "stem": {
      +                "properties": {
      +                  "chinese": {
      +                    "type": "string"
      +                  },
      +                  "element": {
      +                    "type": "string"
      +                  },
      +                  "elementLocalized": {
      +                    "type": "string"
      +                  },
      +                  "id": {
      +                    "type": "string"
      +                  },
      +                  "pinyin": {
      +                    "type": "string"
      +                  },
      +                  "polarity": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "id",
      +                  "chinese",
      +                  "pinyin",
      +                  "element",
      +                  "polarity"
      +                ],
      +                "type": "object"
      +              },
      +              "tenGod": {
      +                "properties": {
      +                  "category": {
      +                    "type": "string"
      +                  },
      +                  "chinese": {
      +                    "type": "string"
      +                  },
      +                  "id": {
      +                    "type": "string"
      +                  },
      +                  "keynote": {
      +                    "type": "string"
      +                  },
      +                  "name": {
      +                    "type": "string"
      +                  },
      +                  "nameLocalized": {
      +                    "type": "string"
      +                  },
      +                  "pinyin": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "id",
      +                  "name",
      +                  "chinese",
      +                  "pinyin",
      +                  "category",
      +                  "keynote"
      +                ],
      +                "type": "object"
      +              }
      +            },
      +            "required": [
      +              "position",
      +              "id",
      +              "number",
      +              "stem",
      +              "branch",
      +              "tenGod",
      +              "hiddenStems",
      +              "naYin",
      +              "naYinChinese",
      +              "naYinElement"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "strength": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "pillars",
      +        "dayMaster",
      +        "strength",
      +        "conventions"
      +      ],
      +      "type": "object"
      +    },
      +    "personB": {
      +      "properties": {
      +        "conventions": {
      +          "properties": {
      +            "dayBoundary": {
      +              "enum": [
      +                "split-zi",
      +                "midnight",
      +                "early-zi"
      +              ],
      +              "type": "string"
      +            },
      +            "hourClock": {
      +              "enum": [
      +                "clock",
      +                "local-mean",
      +                "solar"
      +              ],
      +              "type": "string"
      +            },
      +            "yearBoundary": {
      +              "enum": [
      +                "li-chun",
      +                "lunar-new-year"
      +              ],
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "dayBoundary",
      +            "yearBoundary",
      +            "hourClock"
      +          ],
      +          "type": "object"
      +        },
      +        "dayMaster": {
      +          "properties": {
      +            "chinese": {
      +              "type": "string"
      +            },
      +            "element": {
      +              "type": "string"
      +            },
      +            "elementLocalized": {
      +              "type": "string"
      +            },
      +            "nature": {
      +              "type": "string"
      +            },
      +            "pinyin": {
      +              "type": "string"
      +            },
      +            "polarity": {
      +              "type": "string"
      +            },
      +            "stem": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "stem",
      +            "chinese",
      +            "pinyin",
      +            "element",
      +            "polarity",
      +            "nature"
      +          ],
      +          "type": "object"
      +        },
      +        "pillars": {
      +          "items": {
      +            "properties": {
      +              "branch": {
      +                "properties": {
      +                  "animal": {
      +                    "type": "string"
      +                  },
      +                  "animalLocalized": {
      +                    "type": "string"
      +                  },
      +                  "chinese": {
      +                    "type": "string"
      +                  },
      +                  "element": {
      +                    "type": "string"
      +                  },
      +                  "elementLocalized": {
      +                    "type": "string"
      +                  },
      +                  "id": {
      +                    "type": "string"
      +                  },
      +                  "pinyin": {
      +                    "type": "string"
      +                  },
      +                  "polarity": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "id",
      +                  "chinese",
      +                  "pinyin",
      +                  "animal",
      +                  "element",
      +                  "polarity"
      +                ],
      +                "type": "object"
      +              },
      +              "hiddenStems": {
      +                "items": {
      +                  "properties": {
      +                    "role": {
      +                      "type": "string"
      +                    },
      +                    "stem": {
      +                      "properties": {
      +                        "chinese": {
      +                          "type": "string"
      +                        },
      +                        "element": {
      +                          "type": "string"
      +                        },
      +                        "elementLocalized": {
      +                          "type": "string"
      +                        },
      +                        "id": {
      +                          "type": "string"
      +                        },
      +                        "pinyin": {
      +                          "type": "string"
      +                        },
      +                        "polarity": {
      +                          "type": "string"
      +                        }
      +                      },
      +                      "required": [
      +                        "id",
      +                        "chinese",
      +                        "pinyin",
      +                        "element",
      +                        "polarity"
      +                      ],
      +                      "type": "object"
      +                    },
      +                    "tenGod": {
      +                      "properties": {
      +                        "category": {
      +                          "type": "string"
      +                        },
      +                        "chinese": {
      +                          "type": "string"
      +                        },
      +                        "id": {
      +                          "type": "string"
      +                        },
      +                        "keynote": {
      +                          "type": "string"
      +                        },
      +                        "name": {
      +                          "type": "string"
      +                        },
      +                        "nameLocalized": {
      +                          "type": "string"
      +                        },
      +                        "pinyin": {
      +                          "type": "string"
      +                        }
      +                      },
      +                      "required": [
      +                        "id",
      +                        "name",
      +                        "chinese",
      +                        "pinyin",
      +                        "category",
      +                        "keynote"
      +                      ],
      +                      "type": "object"
      +                    }
      +                  },
      +                  "required": [
      +                    "stem",
      +                    "role",
      +                    "tenGod"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              "id": {
      +                "type": "string"
      +              },
      +              "naYin": {
      +                "type": "string"
      +              },
      +              "naYinChinese": {
      +                "type": "string"
      +              },
      +              "naYinElement": {
      +                "type": "string"
      +              },
      +              "number": {
      +                "type": "number"
      +              },
      +              "position": {
      +                "type": "string"
      +              },
      +              "stem": {
      +                "properties": {
      +                  "chinese": {
      +                    "type": "string"
      +                  },
      +                  "element": {
      +                    "type": "string"
      +                  },
      +                  "elementLocalized": {
      +                    "type": "string"
      +                  },
      +                  "id": {
      +                    "type": "string"
      +                  },
      +                  "pinyin": {
      +                    "type": "string"
      +                  },
      +                  "polarity": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "id",
      +                  "chinese",
      +                  "pinyin",
      +                  "element",
      +                  "polarity"
      +                ],
      +                "type": "object"
      +              },
      +              "tenGod": {
      +                "properties": {
      +                  "category": {
      +                    "type": "string"
      +                  },
      +                  "chinese": {
      +                    "type": "string"
      +                  },
      +                  "id": {
      +                    "type": "string"
      +                  },
      +                  "keynote": {
      +                    "type": "string"
      +                  },
      +                  "name": {
      +                    "type": "string"
      +                  },
      +                  "nameLocalized": {
      +                    "type": "string"
      +                  },
      +                  "pinyin": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "id",
      +                  "name",
      +                  "chinese",
      +                  "pinyin",
      +                  "category",
      +                  "keynote"
      +                ],
      +                "type": "object"
      +              }
      +            },
      +            "required": [
      +              "position",
      +              "id",
      +              "number",
      +              "stem",
      +              "branch",
      +              "tenGod",
      +              "hiddenStems",
      +              "naYin",
      +              "naYinChinese",
      +              "naYinElement"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "strength": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "pillars",
      +        "dayMaster",
      +        "strength",
      +        "conventions"
      +      ],
      +      "type": "object"
      +    },
      +    "score": {
      +      "type": "number"
      +    },
      +    "summary": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "personA",
      +    "personB",
      +    "dayMasterRelation",
      +    "interactions",
      +    "score",
      +    "harmoniousCount",
      +    "challengingCount",
      +    "summary"
      +  ],
      +  "type": "object"
      +}
  4. Changed2 schema fields changed
    • changedInput schema / properties / personA / properties / timezone / description
      Previous value: -"IANA name (e.g. \"America/New_York\", \"Europe/London\", \"UTC\"), decimal hours (e.g. -5 for EST, 1 for CET), or a fixed UTC offset (e.g. \"-05:00\", \"+01:00\"). Prefer the IANA name: it is resolved to the DST-correct offset for the birth date, while a fixed offset or decimal is taken literally and will be wrong if it does not match the daylight-saving state on that date. Invalid timezones return 400 with a validation error."New value: +"IANA name (e.g. \"America/New_York\", \"Europe/London\", \"UTC\"), decimal hours (e.g. -5 for EST, 1 for CET), or a fixed UTC offset (e.g. \"-05:00\", \"+01:00\"). Prefer the IANA name: it is resolved to the offset in force at the birth date and time, historical daylight-saving rules included, while a fixed offset or decimal is taken literally and will be wrong if it does not match the daylight-saving state at that moment. On a transition day a time in the repeated hour is read as its first occurrence and a time in the skipped hour is moved forward past the gap. Invalid timezones return 400 with a validation error."
    • changedInput schema / properties / personB / properties / timezone / description
      Previous value: -"IANA name (e.g. \"America/New_York\", \"Europe/London\", \"UTC\"), decimal hours (e.g. -5 for EST, 1 for CET), or a fixed UTC offset (e.g. \"-05:00\", \"+01:00\"). Prefer the IANA name: it is resolved to the DST-correct offset for the birth date, while a fixed offset or decimal is taken literally and will be wrong if it does not match the daylight-saving state on that date. Invalid timezones return 400 with a validation error."New value: +"IANA name (e.g. \"America/New_York\", \"Europe/London\", \"UTC\"), decimal hours (e.g. -5 for EST, 1 for CET), or a fixed UTC offset (e.g. \"-05:00\", \"+01:00\"). Prefer the IANA name: it is resolved to the offset in force at the birth date and time, historical daylight-saving rules included, while a fixed offset or decimal is taken literally and will be wrong if it does not match the daylight-saving state at that moment. On a transition day a time in the repeated hour is read as its first occurrence and a time in the skipped hour is moved forward past the gap. Invalid timezones return 400 with a validation error."
  5. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare a safe read-only, non-destructive operation, so the bar is lower. The description adds genuinely useful behavioral context beyond that: the score is a weighting choice and the full interaction list is returned so a caller can recompute independently, which tells the agent how much to trust the tallied result.

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

Conciseness4/5

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

The core action and return shape are front-loaded in the first two sentences, with the audience sentence last. It is a dense but unified paragraph with little wasted text, though the closing positioning sentence is the most expendable.

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

Completeness4/5

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

For a high-complexity tool with nested birth-data objects and many convention enums, the description adequately conveys the comparison output (resolved charts, Day Master relation, cross-chart interactions, score). With an output schema present it needn't enumerate returns, yet it still does so usefully.

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

Parameters3/5

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

Schema description coverage is 100% and the nested personA/personB objects are exhaustively documented, so the schema carries the parameter burden. The description adds no parameter-level meaning beyond implying two symmetric subject blocks, which is the baseline for high-coverage schemas.

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

Purpose4/5

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

States a specific verb and resource: 'Compare two BaZi charts pillar by pillar,' and immediately frames it as a two-person matchmaking reading. The two-chart scope inherently separates it from the sibling single-chart post_chinese_astrology_bazi_chart, though that sibling is never named.

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

Usage Guidelines4/5

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

Gives clear context for when it applies ('matchmaking products, relationship features, and agents that need a defensible two-chart reading'). It offers no explicit when-not or routing to alternatives such as post_chinese_astrology_bazi_chart for single-person readings, so it stops short of full guidance.

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