Skip to main content
Glama
nmhaaa3218

Tu Vi Horoscope MCP Server

convert_calendar

Convert dates between Solar and Lunar calendars. Essential for translating Solar periods to Lunar for Tu Vi transit calculations.

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 Chinese 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: Timezone offset (default: 7, matching Vietnam/ICT).

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 or fail calendar validation.

Input Schema

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

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

No annotations are provided, so the description carries the full burden. It discloses side effects (none), auth/rate limits (local, no restrictions), output schema structure, and error conditions. It could mention potential numerical range limits beyond the year range, but is largely transparent.

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 well-structured with clear sections and front-loaded purpose. It is comprehensive but slightly long; each sentence adds value for a complex tool, so brevity trade-off is justified.

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 the tool has 6 parameters, no output schema, and is part of a specialized domain (calendar conversion for astrology), the description is complete: it covers purpose, usage, parameters, return values, error handling, and integrates with sibling tools. No gaps remain for an informed agent.

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?

Schema coverage is 0%, so description must compensate. It provides detailed explanations for all 6 parameters, including defaults and when each applies (e.g., lunar_leap only when from_solar=False). This fully clarifies parameter usage 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 clearly states the tool converts dates between Solar and Lunar calendars. It distinguishes from siblings by noting that chart generation tools handle conversions internally, so this tool is specifically for transit assessments.

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 description provides explicit guidance on when to use (for Tu Vi transit calculations) and when not to use (for base chart calculations, which are handled by generate_horoscope). It also lists prerequisites and critical context about transit assessments.

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