Skip to main content
Glama
nmhaaa3218

Tu Vi Horoscope MCP Server

generate_horoscope

Create a Tu Vi horoscope chart from birth details, returning structured data and an optional visual PNG image.

Instructions

Generate a full Tu Vi (Vietnamese horoscope) chart from raw birth details, with optional high-quality visual chart image rendering.

Purpose and Comparison

Use this tool when you want to compute and inspect an astrological birth chart from scratch for arbitrary birth details without retrieving from or saving to the database.

  • Contrast with get_saved_horoscope: Use generate_horoscope for new/unsaved calculations. Use get_saved_horoscope when you want to load a previously saved profile by ID or Name.

  • Contrast with save_horoscope: This tool does not persist details. Use save_horoscope to store details for future quick reference.

Side Effects, Auth, and Rate Limits

  • Side Effects: If generate_image is True, it renders a high-quality PNG chart layout and saves it to a temporary path on the local filesystem, returning the file path. It is read-only with respect to database/user records.

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

Prerequisites

  • The date parameters must form a valid date in either the Solar or Lunar calendar.

Parameter Guidelines & Interactions

  • name: Name of the subject (default: "Khách").

  • day: Day of birth (1-31).

  • month: Month of birth (1-12).

  • year: Year of birth (e.g., 1995).

  • hour_val: Hour of birth. Accepts string formats like "14:30", "Ngọ" (Earthly Branch name), or numeric branch index (1-12, where 1=Tý, 12=Hợi) (default: "12:00").

  • gender_val: Gender of the subject. Accepts "Nam", "Nữ", "male", "female" (case-insensitive, default: "Nam").

  • is_solar: Set to True (default) if the birth date is Solar (Dương lịch). Set to False if it is Lunar (Âm lịch).

  • current_year: Year to calculate transit stars/Vận Hạn for (default: system current year, e.g., 2026).

  • generate_image: Set to True (default) to render and return a visual PNG chart along with raw data. Set to False to return only raw data.

Output Schema and Error Conditions

  • If generate_image is True: Returns a list [Image, chart_data] where Image is a FastMCP Image object pointing to the generated PNG file on disk, and chart_data is a dictionary containing structured chart details (demographics, houses, stars).

  • If generate_image is False: Returns only the chart_data dictionary.

  • Structure of chart_data:

    • thien_ban: Dict containing calculated demographics, pillars/Can-Chi (year, month, day, hour), element (Hành Cục), destiny (Bản Mệnh), etc.

    • dia_ban: List of 12 dicts, each representing an astrological house (cung), including cung_so (1-12), cung_ten (name), cung_chu (domain), sao (list of stars), and optional transit/Hạn keys.

  • Errors: Returns an error dictionary {"error": "error_message"} if calculations fail (e.g. invalid date formats, out-of-range birth years).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dayNo
nameNoKhách
yearNo
monthNo
hour_valNo12:00
is_solarNo
gender_valNoNam
current_yearNo
generate_imageNo
Behavior5/5

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

With no annotations, the description fully discloses side effects (temporary filesystem write for image generation), read-only database behavior, and lack of auth/rate limits. It also details output structure and error conditions.

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?

Well-structured with clear sections (purpose, comparison, side effects, parameters, output), but slightly verbose in some areas. However, the length is justified given complexity.

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?

Complete coverage of tool behavior for a complex 9-parameter tool with no output schema or annotations: explains all inputs, output schema in detail, error handling, and contrasts with all relevant sibling tools.

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?

Despite 0% schema description coverage, the description thoroughly explains each parameter: types, defaults, acceptable formats (e.g., hour_val as string or branch index), and meaning (is_solar for calendar type). This adds significant value 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 generates a full Tu Vi chart from raw birth details with optional image rendering, using a specific verb and resource. It distinguishes from siblings by specifying it's for new/unsaved calculations and not for persistence.

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?

Explicitly contrasts with get_saved_horoscope (for loading saved profiles) and save_horoscope (for persistence), and provides prerequisites for valid dates. This gives clear when-to-use and when-not-to-use guidance.

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