Skip to main content
Glama
Espivc

ming-metaphysics-mcp

by Espivc

ming_fengshui_flying_stars

Compute your Kua number and annual Flying Star map to identify favorable and unfavorable directions. Use this tool to synthesize directional advice based on Eight Mansions and yearly star positions for improved feng shui.

Instructions

Compute the Kua number (卦命), directional analysis, and annual Flying Star map (年飛星) for a person. Returns Kua group, favorable/unfavorable directions per Eight Mansions (八宅法), the nine-palace annual star chart for the requested year, and a five-engine directional synthesis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearYesYear for the annual Flying Star map (年飛星). Range 1700–2100. Defaults to current year when omitted.
birth_dateYesDate of birth in YYYY-MM-DD format — used to compute the Kua number.
genderYesGender is required for Kua number calculation.
location_descriptionNoOptional. Description of the property (e.g. 'apartment, front door faces North').

Implementation Reference

  • The handler function that executes the ming_fengshui_flying_stars tool logic. It calls runConsult (HTTP POST /consult), extracts fengshui/combined fields from the response, and returns a structured JSON result with Kua number, directions, annual star map, and five-engine synthesis.
    handler: async (args) => {
      const raw = (await runConsult({
        date: args.birth_date as string,
        gender: args.gender as string,
        goal: "general",
        year: args.year as number,
      })) as Record<string, unknown>;
    
      const fengshui = raw.fengshui as Record<string, unknown> | undefined;
      const combined = raw.combined as Record<string, unknown> | undefined;
    
      const result = {
        requested_year: args.year,
        location_description: args.location_description ?? null,
        kua_number: fengshui?.kua ?? null,
        kua_name: fengshui?.kua_name ?? null,
        kua_group: fengshui?.group ?? null,
        favorable_directions: fengshui?.favorable ?? null,
        unfavorable_directions: fengshui?.unfavorable ?? null,
        all_favorable_dirs: fengshui?.all_favorable_dirs ?? null,
        all_unfavorable_dirs: fengshui?.all_unfavorable_dirs ?? null,
        power_direction: fengshui?.power_direction ?? null,
        annual_star_map: fengshui?.annual_star_map ?? null,
        annual_star_year: fengshui?.annual_star_year ?? args.year,
        five_engine_synthesis: {
          best_directions: combined?.best_directions ?? null,
          confidence: combined?.confidence ?? null,
          signals: combined?.signals ?? null,
          warnings: combined?.warnings ?? null,
          recommendation: combined?.recommendation ?? null,
        },
      };
      return JSON.stringify(result, null, 2);
    },
  • Input schema for ming_fengshui_flying_stars: validates year (1700-2100), birth_date (YYYY-MM-DD), gender (male/female), and optional location_description.
    inputSchema: {
      type: "object",
      properties: {
        year: {
          type: "integer",
          minimum: 1700,
          maximum: 2100,
          description:
            "Year for the annual Flying Star map (年飛星). Range 1700–2100. " +
            "Defaults to current year when omitted.",
        },
        birth_date: {
          type: "string",
          format: "date",
          description: "Date of birth in YYYY-MM-DD format — used to compute the Kua number.",
        },
        gender: {
          type: "string",
          enum: ["male", "female"],
          description: "Gender is required for Kua number calculation.",
        },
        location_description: {
          type: "string",
          description:
            "Optional. Description of the property (e.g. 'apartment, front door faces North').",
        },
      },
      required: ["year", "birth_date", "gender"],
    },
  • TOOLS array registration — fengshuiTool (containing definition + handler) is included in the array of all MCP tools.
    export const TOOLS = [baziTool, qmdjTool, zwdsTool, fengshuiTool, ichingTool, forecastTool];
  • src/tools/index.ts:4-4 (registration)
    Re-export of fengshuiTool from fengshui.ts module.
    export { fengshuiTool } from "./fengshui.js";
  • The runConsult helper function that makes the actual HTTP POST request to the Ming engine's /consult endpoint, which is called by the fengshui handler.
    export async function runConsult(params: ConsultParams): Promise<unknown> {
      const url = buildUrl("/consult", {
        date: params.date,
        hour: params.hour,
        gender: params.gender,
        question: params.question,
        goal: params.goal,
        target_date: params.target_date,
        iching_number: params.iching_number,
        year: params.year,
        forecast_year: params.forecast_year,
      });
      const res = await fetch(url.toString(), {
        method: "POST",
        signal: AbortSignal.timeout(TIMEOUT_MS),
      });
      return handleResponse(res, "/consult");
    }
Behavior3/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 describes the computational outputs but does not disclose behavioral traits such as accuracy assumptions, required expertise, or rate limits.

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 two sentences, front-loading the main purpose. It lists outputs efficiently, though a more structured format (e.g., bullet points) could improve clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description must hint at return format. It lists all major outputs (Kua group, directions, chart, synthesis), which is adequate for an agent to understand the return value, though format details are missing.

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%, so baseline is 3. The description adds meaning by explaining the purpose of each parameter (e.g., year for annual star map, birth_date for Kua calculation), which is beyond the schema's type and format details.

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 explicitly states the tool computes Kua number, directional analysis, and annual Flying Star map, listing specific outputs (Kua group, directions, chart, synthesis). This distinguishes it from siblings like ming_bazi_analyze and ming_qmdj_direction.

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

Usage Guidelines3/5

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

The description does not provide explicit guidance on when to use this tool versus alternatives. While the listed outputs imply a feng shui context, no direct comparison or exclusion is given.

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/Espivc/ming-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server