Skip to main content
Glama
nmhaaa3218

Tu Vi Horoscope MCP Server

convert_calendar

Convert dates between Solar and Lunar calendars to prepare for Tử Vi transit assessments. Essential for translating periods like 'October 2026' before calculating Vận Hạn.

Instructions

Convert a date between the Solar (Dương lịch) and Lunar (Âm lịch) calendars.

Purpose and Comparison

Use this tool to translate dates back and forth between Solar and Lunar systems.

  • CRITICAL FOR TRANSIT ASSESSMENTS: Since Tu Vi transit calculations (sao lưu, Đại Hạn, Tiểu Hạn, Nguyệt Hạn) operate strictly on the Lunar calendar, you MUST convert any Solar target periods (e.g. "October 2026") using this tool before calling get_van_han.

  • Do NOT use this tool if you only need base chart calculation, as chart generation tools (generate_horoscope and get_saved_horoscope) already handle birth date conversions internally.

Side Effects, Auth, and Rate Limits

  • Side Effects: None. This is a pure mathematical calculation.

  • Auth/Rate Limits: Runs entirely locally. No authentication or external rate limits apply.

Prerequisites

  • The date to convert must represent a valid Gregorian or Vietnamese Lunar date within calendar ranges (typically 1900-2100).

Parameter Guidelines & Interactions

  • day: Day of the date to convert (1-31).

  • month: Month of the date to convert (1-12).

  • year: Year of the date to convert (four-digit year).

  • from_solar: If True (default), converts Solar to Lunar. If False, converts Lunar to Solar.

  • lunar_leap: Only applicable when from_solar=False. Set to True if the source Lunar month is a leap month (tháng nhuận); otherwise False.

  • timezone: Numeric UTC offset (default 7 for ICT / Vietnam). Accepts integer (e.g. 8) or h:30 string (e.g. "8:30"). Other minutes values and out-of-range inputs are rejected.

Output Schema and Error Conditions

  • Returns: A dictionary containing:

    • day: Converted day (int).

    • month: Converted month (int).

    • year: Converted year (int).

    • leap: Boolean indicating if the Lunar month is a leap month.

  • Errors: Returns {"error": "error_message"} if date arguments are out of bounds, fail calendar validation, or timezone is malformed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dayYes
yearYes
monthYes
timezoneNo
from_solarNo
lunar_leapNo
Behavior5/5

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

With no annotations provided, the description carries the full burden and exceeds it. It explicitly declares 'Side Effects: None. This is a pure mathematical calculation,' and 'Runs entirely locally. No authentication or external rate limits apply.' It also discloses error behavior (returns error dictionary for invalid input). This is comprehensive behavioral disclosure.

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?

Though long, the description uses clear markdown sections (Purpose, Side Effects, Prerequisites, Parameter Guidelines, Output Schema) with bullet points. Every sentence conveys necessary details for correct usage. It is front-loaded with the core purpose and critical usage warning, and the formatting makes it scannable. No wasted words.

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?

Given no annotations, no output schema, and 6 parameters with 0% schema description coverage, the description fully compensates. It provides prerequisites, parameter constraints, expected output keys, error conditions, and operational context (local execution). The agent has everything needed to confidently invoke the tool and interpret results.

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

Parameters5/5

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

The input schema has zero descriptions (coverage 0%), so the description is the only source of parameter meaning. It fully compensates by explaining every parameter: day/month/year ranges, `from_solar` default and effect, `lunar_leap` conditionality, and the timezone format with examples and rejection of out-of-range values. It also notes interactions between `from_solar` and `lunar_leap`, adding semantics beyond the schema.

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 opens with a clear verb+resource statement: 'Convert a date between the Solar (Dương lịch) and Lunar (Âm lịch) calendars.' It also explicitly distinguishes from sibling tools by stating that chart generation tools already handle conversions internally and that this tool is mandatory for transit assessments before `get_van_han`. This fully disambiguates purpose from sibling 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?

Provides explicit usage context: 'CRITICAL FOR TRANSIT ASSESSMENTS' with a clear directive to convert Solar periods before calling `get_van_han`. It also states when NOT to use the tool: 'Do NOT use this tool if you only need base chart calculation' and names the alternative tools. This gives the agent complete decision criteria.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nmhaaa3218/TuViMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server