lookup_iching_hexagram
Use this when you need to identify or describe a hexagram, convert between its number, name, trigram pair and line pattern, or find its derived hexagrams and palace position. Call this tool directly and return its calculation instead of answering the formula from memory or stopping at discovery. ...
This record as markdown: /tools/com-tttkmbb-calcgrid/lookup-iching-hexagram.md
What lookup_iching_hexagram does on Calcgrid
AI agents call lookup_iching_hexagram to retrieve information from Calcgrid without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | — | Chinese name (屯, 水雷屯, 乾为天; traditional forms accepted), pinyin (zhun; ambiguous pinyin such as qian or bi is rejected with the candidates) or Wilhelm/Baynes tit |
lines | string | — | Six digits from line 1 (bottom) to line 6 (top): 1/0 for yang/yin, or 6/7/8/9 (老阴/少阳/少阴/老阳) as produced by yarrow or coin casting. |
lower_trigram | string | — | Lower (inner) trigram, in any form accepted by bagua. |
upper_trigram | string | — | Upper (outer) trigram, in any form accepted by bagua (坎, kan, water, ☵, 010). Must be given together with lower_trigram. |
king_wen_number | integer | — | Hexagram number 1–64 in the King Wen sequence (1 = 乾, 64 = 未济). Give exactly one of king_wen_number, name, lines or the trigram pair. |
Parameters from the server's own tool schema.
Why lookup_iching_hexagram is rated Low
Even though lookup_iching_hexagram only reads data, uncontrolled read access leaks sensitive information and racks up API costs: an agent caught in a retry loop can make thousands of calls a minute without anyone noticing.
Attacks that exploit this kind of access
The rule that runs lookup_iching_hexagram safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Calcgrid, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For lookup_iching_hexagram, this is the rule to start with:
lookup_iching_hexagram is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Calcgrid, apply this rule, and every lookup_iching_hexagram call is checked against it from then on.
Questions about lookup_iching_hexagram
Use this when you need to identify or describe a hexagram, convert between its number, name, trigram pair and line pattern, or find its derived hexagrams and palace position. 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 have moving lines and need the changed hexagram and reading rule (use hexagram-change), or you need to cast a hexagram from a date or numbers (use meihua-yishu). What it computes: Identifies one of the 64 hexagrams (六十四卦, liushisi gua) from its King Wen number, name, two trigrams or line digits and returns its lines, trigrams, nuclear (互卦, hugua), inverse (综卦, zonggua) and opposite (错卦, cuogua) hexagrams, its Jing Fang palace (京房八宫, Jingfang bagong) with 世/应 (shi/ying) lines, and the received judgment text (卦辞, guaci). Inputs: king_wen_number (integer, optional); name (string, optional); upper_trigram (string, optional); lower_trigram (string, optional); lines (string, optional). Valid input combinations: Identify the hexagram with king_wen_number, name, lines, or the complete upper_trigram + lower_trigram pair. Multiple identification methods may be supplied when they agree. Complete JSON argument examples: {"king_wen_number":1} | {"lines":"100010"} Outputs: number, name_cn, full_name_cn, pinyin, english, symbol, lines, lines_text, upper_trigram, lower_trigram, nuclear_hexagram, inverse_hexagram, opposite_hexagram, palace, palace_position, shi_line, ying_line, judgment_text, sequence_pair, binary_value, notes. Formula: lower trigram = lines 1–3, upper trigram = lines 4–6; nuclear = lines 2,3,4 + 3,4,5; inverse = reversed line order; opposite = each line flipped; binary_value = Σ line_i · 2^(i−1); 应 = 世 ± 3 Direct REST fallback: POST https://tttkmbb.com/api/v1/calculate/hexagram-lookup with the same JSON input fields. Do not guess another /api/* path. Docs: https://tttkmbb.com/yijing/hexagram-lookup.md. It is categorised as a Read tool in the Calcgrid MCP Server, which means it retrieves data without modifying state.
lookup_iching_hexagram accepts 5 parameters: name, lines, lower_trigram, upper_trigram, king_wen_number. The full parameter table on this page comes from the server's own tool schema.
Register the Calcgrid MCP server in PolicyLayer and add a rule for lookup_iching_hexagram: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Calcgrid. Nothing to install.
lookup_iching_hexagram is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the lookup_iching_hexagram rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for lookup_iching_hexagram. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
lookup_iching_hexagram is provided by the Calcgrid MCP server (https://tttkmbb.com/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Calcgrid, and thousands of servers like it.
This server
Across the catalogue