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
service_versionYesDeployed Calcgrid implementation version used for the result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / service_version
      Added value: +{
      +  "description": "Deployed Calcgrid implementation version used for the result.",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "success",
      -  "request",
      -  "result",
      -  "timestamp"
      -]New value: +[
      +  "success",
      +  "service_version",
      +  "request",
      +  "result",
      +  "timestamp"
      +]
  2. 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
      +  }
      +]
  3. 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"
      +]
  4. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnly and idempotent annotations, the description discloses meaningful behavior: it validates leap-month and day existence, reports month length and ganzhi, uses a specific formula with a UTC+8 new-moon day, and includes a REST fallback with a warning not to guess API paths. No contradiction with annotations exists.

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 description is longer than average but well sectionalized: use case, exclusions, computed outputs, examples, formula, and fallback. It is front-loaded with the primary trigger and every major block earns its place, though minor redundancy with the schema's examples prevents a perfect score.

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?

Covers selection criteria, input constraints, output fields, validation behavior, fallback API, and documentation link. With the output schema and annotations also present, an agent has everything needed to select and invoke the tool correctly.

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 coverage is 100%, and the schema already documents ranges, defaults, and leap-month meaning. The description only restates the inputs and repeats the same JSON examples found in the schema, adding little semantic information beyond the structured definition.

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?

States a specific verb and resource: converting a Chinese lunar date (year, month, leap flag, day) into the Gregorian date. It explicitly contrasts itself with the reverse conversion and festival-listing use cases, so an agent can distinguish it from convert_solar_to_lunar and related tools.

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?

The first sentence gives the exact trigger condition ('when you know a lunar date... and need the Gregorian date'), and the next paragraph lists two explicit exclusions with named alternatives. Although the named alternatives are not verbatim sibling tool names, the intended mapping is unmistakable and selection guidance is clear.

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