Skip to main content
Glama

Plum Blossom Numerology (梅花易数)

cast_plum_blossom_hexagram
Read-onlyIdempotent

Use this when you need a Plum Blossom hexagram cast for a moment or from numbers, with the upper/lower trigram arithmetic, the moving line and the 体/用 five-element reading laid out step by step. 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 already have six lines from coins or yarrow (use liuyao for a 六爻 chart or hexagram-change for plain line changes), or you only want a hexagram's text and structure (use hexagram-lookup). What it computes: Casts an I Ching hexagram by the Plum Blossom (Meihua Yishu) method of Shao Yong from the lunar year, month, day and hour (年月日时起卦) or from two or three given numbers, then derives the moving line, changed hexagram (之卦), nuclear hexagram (互卦), the 体 (Ti, self) and 用 (Yong, matter) trigrams and their five-element relations. Inputs: method (enum, optional); date (date, optional); time (string, optional); number_1 (integer, optional); number_2 (integer, optional); number_3 (integer, optional); add_hour_to_moving_line (boolean, optional). Valid input combinations: time_method needs date/time only; two_numbers requires number_1 + number_2; three_numbers requires number_1 + number_2 + number_3. Complete JSON argument examples: {"method":"time_method","date":"2026-09-24","time":"14:30"} | {"method":"two_numbers","number_1":3,"number_2":7,"date":"2026-09-24","time":"12:00"} Outputs: method_used, lunar_date, upper_trigram, lower_trigram, original_hexagram, original_lines, moving_line, moving_line_name, changed_hexagram, nuclear_hexagram, ti_trigram, yong_trigram, ti_element, yong_element, yong_ti_relation, nuclear_relations, changed_relation, ti_seasonal_strength, calculation_trace, reading_hint, disclaimer. Formula: Time method: year = branch number of the lunar year (子 = 1 … 亥 = 12), month = lunar month, day = lunar day, hour = 时辰 number (子 = 1 … 亥 = 12); upper = (year + month + day) mod 8, lower = (year + month + day + hour) mod 8, moving line = (year + month + day + hour) mod 6 (remainder 0 → 8 or 6); trigram numbers in earlier-heaven order 乾1 兑2 离3 震4 巽5 坎6 艮7 坤8. Two numbers: upper = number_1 mod 8, lower = number_2 mod 8, moving = (number_1 + number_2 [+ hour]) mod 6. Three numbers: moving = number_3 mod 6. 体 = trigram without the moving line, 用 = trigram with it; relations by the five-element generating (木→火→土→金→水) and controlling (木→土→水→火→金) cycles. Direct REST fallback: POST https://tttkmbb.com/api/v1/calculate/meihua-yishu with the same JSON input fields. Do not guess another /api/* path. Docs: https://tttkmbb.com/yijing/meihua-yishu.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNoCivil date in China Standard Time (UTC+8), 1900–2100; defaults to today.today
timeNoClock time HH:MM (China Standard Time) that fixes the 时辰 (double hour) for the time method or the optional hour addition.12:00
methodNoHow the trigrams and the moving line are derived.time_method
number_1NoFirst number for the number methods; mod 8 gives the upper trigram (0 counts as 8).
number_2NoSecond number for the number methods; mod 8 gives the lower trigram.
number_3NoThird number for the three-number method; mod 6 gives the moving line (0 counts as 6).
add_hour_to_moving_lineNoTwo-number method only: some schools add the 时辰 number (子 = 1 … 亥 = 12) of the given time before taking mod 6.

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / anyOf
      Added value: +[
      +  {
      +    "properties": {
      +      "method": {
      +        "const": "time_method"
      +      }
      +    }
      +  },
      +  {
      +    "properties": {
      +      "method": {
      +        "const": "two_numbers"
      +      }
      +    },
      +    "required": [
      +      "method",
      +      "number_1",
      +      "number_2"
      +    ]
      +  },
      +  {
      +    "properties": {
      +      "method": {
      +        "const": "three_numbers"
      +      }
      +    },
      +    "required": [
      +      "method",
      +      "number_1",
      +      "number_2",
      +      "number_3"
      +    ]
      +  }
      +]
    • addedInput schema / description
      Added value: +"time_method needs date/time only; two_numbers requires number_1 + number_2; three_numbers requires number_1 + number_2 + number_3."
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "date": "2026-09-24",
      +    "method": "time_method",
      +    "time": "14:30"
      +  },
      +  {
      +    "date": "2026-09-24",
      +    "method": "two_numbers",
      +    "number_1": 3,
      +    "number_2": 7,
      +    "time": "12:00"
      +  }
      +]
  2. Added
  3. Removed
  4. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already mark the tool read-only and idempotent, and the description does not contradict them. It adds substantial behavior beyond annotations: the exact modulo formulas for upper/lower trigrams and moving line, the handling of remainder 0, and the full output field list including 体/用 five-element relations. Providing the REST fallback path also removes ambiguity about how the computation is reached.

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?

Long, but sectioned and front-loaded with the use/when-not guidance before any technical detail. The formula, output list, valid combinations, JSON examples, REST fallback, and docs link each serve a distinct purpose, so the length is justified by the tool's multi-method 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?

Given seven parameters, three method variants, an output schema, and annotations, the description covers method selection, input constraints, computation formula, output fields, and a fallback REST endpoint. Little remains for the agent to infer; the output schema covers return values, and the formula section covers what happens inside the calculation. This is complete for correct 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?

Schema coverage is 100% and each parameter already has a description, so the baseline is met. The description adds value by explaining valid input combinations and how each parameter feeds the arithmetic (number_1 mod 8, number_2 mod 8, number_3 mod 6, add_hour_to_moving_line in the two-number method). It does not fully restate constraints, but the schema and description together are strong.

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 object: 'cast a Plum Blossom hexagram' from a moment or from numbers, then lists exactly what it computes (moving line, changed/nuclear hexagrams, 体/用 relation). It also separates itself from hexagram text/structure retrieval by naming hexagram-lookup for that case. This is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Opens with an explicit trigger condition ('Use this when you need a Plum Blossom hexagram cast for a moment or from numbers') and an explicit exclusion ('Do not use when you already have six lines...'). It names alternatives for the excluded cases, though some names are conceptual rather than matching the sibling list exactly, so the agent has to map them; the yes/no boundary itself 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