Skip to main content
Glama

Lunar to Solar Date Converter

convert_lunar_to_solar
Read-onlyIdempotent

Use this when you know a lunar date such as 八月十五 or 闰六月初一 of a given lunar year and need the Gregorian date (e.g. for a lunar birthday or festival). 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 start from a Gregorian date (use lunar-calendar-converter), or you want every festival of a year at once (use chinese-festivals). What it computes: Converts a Chinese lunar calendar date (year, month, leap-month flag, day) to the Gregorian date, reporting the weekday, the day's ganzhi (干支) and the length of that lunar month, and validating that the leap month and day exist in that year. Example user requests: What Gregorian date is lunar 2026 month 8 day 15? | 2025 年农历闰六月初一对应公历哪一天? | Convert a Chinese lunar birthday to its Gregorian date and verify the leap-month flag. Inputs: lunar_year (integer); lunar_month (integer); is_leap_month (boolean, optional); lunar_day (integer). Complete JSON argument examples: {"lunar_year":2026,"lunar_month":8,"is_leap_month":false,"lunar_day":15} | {"lunar_year":2025,"lunar_month":6,"is_leap_month":true,"lunar_day":1} Outputs: gregorian_date, weekday, day_ganzhi, month_days, lunar_date_chinese, month_name, year_ganzhi, zodiac, julian_day_number, leap_month_note. Formula: JDN = start of the lunar month (new-moon day at UTC+8) + lunar_day − 1; month numbering per GB/T 33661-2017 (month 11 contains the winter solstice; leap month = first month without a 中气) Direct REST fallback: POST https://tttkmbb.com/api/v1/calculate/lunar-to-solar with the same JSON input fields. Do not guess another /api/* path. Docs: https://tttkmbb.com/lunar/lunar-to-solar.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lunar_dayYesDay of the lunar month, 1–30 (day 30 exists only in 30-day months).
lunar_yearYesLunar year number (the year that starts at that year's Chinese New Year), 1900–2100.
lunar_monthYesLunar month number 1 (正月) to 12 (腊月).
is_leap_monthNotrue when the date is in the intercalary month of that number (only valid in years that have that leap month).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
linksNo
resultYes
requestYes
sourcesNo
successYes
versionNo
freshnessNo
timestampYes
next_actionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "is_leap_month": false,
      +    "lunar_day": 15,
      +    "lunar_month": 8,
      +    "lunar_year": 2026
      +  },
      +  {
      +    "is_leap_month": true,
      +    "lunar_day": 1,
      +    "lunar_month": 6,
      +    "lunar_year": 2025
      +  }
      +]
  2. Changed15 schema fields changed
    • changedOutput schema / description
      Previous value: -"Unified result envelope (see /docs/response-format.md)"New value: +"Deterministic calculation result with typed values, units, formula, sources and timestamp."
    • addedOutput schema / properties / next_actions / items
      Added value: +{
      +  "type": "object"
      +}
    • addedOutput schema / properties / request / properties
      Added value: +{
      +  "calculator_id": {
      +    "type": "string"
      +  },
      +  "inputs": {
      +    "type": "object"
      +  },
      +  "tool": {
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / properties / result / properties / calculator_id
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / result / properties / calculator_name
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / result / properties / entity_type
      Added value: +{
      +  "const": "calculation",
      +  "type": "string"
      +}
    • addedOutput schema / properties / result / properties / status
      Added value: +{
      +  "const": "completed",
      +  "type": "string"
      +}
    • addedOutput schema / properties / result / properties / units / additionalProperties
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / result / properties / values / properties
      Added value: +{
      +  "day_ganzhi": {
      +    "description": "Sexagenary day with pinyin, e.g. 壬寅 (Renyin).",
      +    "type": "string"
      +  },
      +  "gregorian_date": {
      +    "description": "Gregorian civil date (China Standard Time).",
      +    "format": "date",
      +    "type": "string"
      +  },
      +  "julian_day_number": {
      +    "description": "Julian Day Number of the Gregorian date.",
      +    "type": "integer"
      +  },
      +  "leap_month_note": {
      +    "description": "Which leap month the lunar year has (if any), so a wrong is_leap_month flag can be corrected.",
      +    "type": "string"
      +  },
      +  "lunar_date_chinese": {
      +    "description": "Written form, e.g. 二〇二六年八月十五.",
      +    "type": "string"
      +  },
      +  "month_days": {
      +    "description": "Length of the requested lunar month (29 or 30).",
      +    "type": "integer"
      +  },
      +  "month_name": {
      +    "description": "Traditional month name, prefixed 闰 for a leap month.",
      +    "type": "string"
      +  },
      +  "weekday": {
      +    "description": "Day of the week.",
      +    "type": "string"
      +  },
      +  "year_ganzhi": {
      +    "description": "Sexagenary year with pinyin, e.g. 丙午 (Bingwu).",
      +    "type": "string"
      +  },
      +  "zodiac": {
      +    "description": "Zodiac animal of the lunar year.",
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / properties / result / required
      Added value: +[
      +  "entity_type",
      +  "calculator_id",
      +  "status",
      +  "values",
      +  "formula",
      +  "summary"
      +]
    • addedOutput schema / properties / sources / items
      Added value: +{
      +  "type": "object"
      +}
    • addedOutput schema / properties / success / const
      Added value: +true
    • addedOutput schema / properties / timestamp / format
      Added value: +"date-time"
    • addedOutput schema / properties / version
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "success"
      -]New value: +[
      +  "success",
      +  "request",
      +  "result",
      +  "timestamp"
      +]
  3. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Beyond annotations that already mark this as read-only and idempotent, the description adds rich behavioral context: it validates leap-month/day existence, explains the formula (JDN = start of month + day − 1), references the GB/T standard, and instructs the agent to call the tool instead of answering from memory. No contradiction with annotations.

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?

The description is clearly sectioned with headers, front-loads the use case, and every section earns its place: examples, inputs, outputs, formula, fallback, docs. It is long but not bloated; the structure makes it easy to scan.

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?

For a tool of this complexity, the description is complete: it covers when to use, what it computes, all inputs with examples, output fields, the underlying formula, a REST fallback, and documentation. Even with the output schema present, the description leaves no meaningful gap for 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?

The schema already covers all four parameters with descriptions and examples, so the baseline is 3. The description adds value by pairing Chinese examples (八月十五, 闰六月初一) with complete JSON argument examples, and by clarifying is_leap_month as 'optional' with a true/false usage. It reinforces the schema without being the only source of meaning.

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?

The description names a specific verb ('Converts') and resource ('Chinese lunar calendar date... to the Gregorian date'), and enumerates the computed outputs. It also explicitly distinguishes itself from reverse conversion ('Do not use this when you start from a Gregorian date') and from mass festival lookups.

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?

There is an explicit 'Use this when...' condition with concrete example requests, and a 'Do not use this when...' section naming two alternative categories. This gives an agent clear selection criteria without needing to inspect sibling schemas.

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