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
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. 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"
      +  }
      +]
  3. Added
  4. Removed
  5. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior. The description adds substantial behavioral detail: it spells out the exact formula used (mod 8 for trigrams, mod 6 for moving line), the step-by-step derivation of 体/用 trigrams, the list of output fields, and even a REST fallback endpoint. It also instructs the agent to call the tool directly rather than answering from memory. This exceeds what annotations provide and fully discloses internal logic.

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 long but every section earns its place: usage guidance, computation summary, input combos, examples, outputs, formula, REST fallback, and docs. It is front-loaded with the most critical 'use when/do not use' statements. Slight deduction for length; it could be tightened by moving the formula to a linked doc, but the density is acceptable.

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's complexity (7 params, multiple methods, rich output schema), the description covers all necessary context: when to use, input constraints, examples, full formula, output fields, and even a fallback API path. Nothing an agent needs to correctly invoke and interpret the result is missing. The presence of an output schema and strong annotations further lightens the burden, and the description still over-delivers.

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 already provides descriptions for all 7 parameters with 100% coverage, so baseline is 3. The description goes far beyond by explaining valid method-specific combinations, giving JSON argument examples, and detailing the formula each parameter contributes to (e.g., how number_1 mod 8 determines the upper trigram, how add_hour_to_moving_line works). This adds meaning well above the schema's parameter descriptions.

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 casts an I Ching hexagram using the Plum Blossom method from time or numbers, and explicitly names the sibling tools (liuyao, hexagram-change, hexagram-lookup) that cover different scenarios. This unambiguously differentiates it from related tools without needing to inspect schemas.

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 'Use this when' and 'Do not use this when' guidance, including concrete alternative tools for six-line coin/yarrow casts and hexagram text lookups. Also specifies valid input combinations (time_method, two_numbers, three_numbers), leaving no ambiguity about when to invoke this tool.

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