Skip to main content
Glama
hjsh200219

Saju Fortune-Telling MCP Server

by hjsh200219

analyze_saju

Analyze Korean Saju (Four Pillars of Destiny) fortune-telling based on birth details to calculate charts, check compatibility, assess yearly fortunes, and provide personalized life guidance.

Instructions

사주 분석 통합 (basic/fortune/yongsin/school_compare/yongsin_method)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
birthDateYesYYYY-MM-DD
birthTimeYesHH:mm
calendarNosolar
isLeapMonthNo
genderYes
analysisTypeYesbasic:사주계산 | fortune:운세 | yongsin:용신 | school_compare:유파비교 | yongsin_method:용신방법론
fortuneTypeNofortune용 (general/career/wealth/health/love)
schoolsNoschool_compare용
methodNoyongsin_method용 (strength/seasonal/mediation/disease)

Implementation Reference

  • The core handler function implementing the analyze_saju tool. Calculates saju data and dispatches to specific analysis types (basic, fortune, yongsin, school_compare, yongsin_method).
    export async function handleAnalyzeSaju(args: AnalyzeSajuArgs): Promise<string> {
      const {
        birthDate,
        birthTime,
        calendar = 'solar',
        isLeapMonth = false,
        gender,
        analysisType,
        fortuneType,
        schools,
        method,
      } = args;
    
      // 사주 계산
      const sajuData = calculateSaju(birthDate, birthTime, calendar, isLeapMonth, gender);
    
      switch (analysisType) {
        case 'basic':
          // 기본 사주팔자만 반환
          return JSON.stringify(sajuData);
    
        case 'fortune': {
          if (!fortuneType) {
            throw new Error('fortune 분석 시 fortuneType 필수');
          }
          const fortune = analyzeFortune(sajuData, fortuneType);
          return JSON.stringify(fortune);
        }
    
        case 'yongsin': {
          const yongsin = selectYongSinOrig(sajuData);
          return JSON.stringify(yongsin);
        }
    
        case 'school_compare': {
          const schoolList: SchoolCode[] = schools || ['ziping', 'dts', 'qtbj', 'modern', 'shensha'];
          const settings = InterpretationSettings.getInstance().getSettings();
          const comparison = await SchoolComparator.compareSchools(sajuData, schoolList, settings);
          return JSON.stringify(comparison);
        }
    
        case 'yongsin_method': {
          if (!method) {
            throw new Error('yongsin_method 분석 시 method 필수');
          }
          const yongsinResult = selectYongSin(sajuData, method as YongSinMethod);
          return JSON.stringify(yongsinResult);
        }
    
        default:
          throw new Error(`알 수 없는 analysisType: ${analysisType}`);
      }
    }
  • JSON Schema definition for the analyze_saju tool, used by MCP for input validation.
    analyze_saju: () => ({
      name: 'analyze_saju',
      description: '사주 분석 통합 (basic/fortune/yongsin/school_compare/yongsin_method)',
      inputSchema: {
        type: 'object',
        properties: {
          birthDate: { type: 'string', description: 'YYYY-MM-DD' },
          birthTime: { type: 'string', description: 'HH:mm' },
          calendar: { type: 'string', enum: ['solar', 'lunar'], default: 'solar' },
          isLeapMonth: { type: 'boolean', default: false },
          gender: { type: 'string', enum: ['male', 'female'] },
          analysisType: {
            type: 'string',
            enum: ['basic', 'fortune', 'yongsin', 'school_compare', 'yongsin_method'],
            description: 'basic:사주계산 | fortune:운세 | yongsin:용신 | school_compare:유파비교 | yongsin_method:용신방법론',
          },
          fortuneType: {
            type: 'string',
            enum: ['general', 'career', 'wealth', 'health', 'love'],
            description: 'fortune용 (general/career/wealth/health/love)',
          },
          schools: {
            type: 'array',
            items: { type: 'string', enum: ['ziping', 'dts', 'qtbj', 'modern', 'shensha'] },
            description: 'school_compare용',
          },
          method: {
            type: 'string',
            enum: ['strength', 'seasonal', 'mediation', 'disease'],
            description: 'yongsin_method용 (strength/seasonal/mediation/disease)',
          },
        },
        required: ['birthDate', 'birthTime', 'gender', 'analysisType'],
      },
    }),
  • Registration in the main tool dispatcher switch statement, routing analyze_saju calls to the handler.
    case 'analyze_saju':
      return await handleAnalyzeSaju(args as Parameters<typeof handleAnalyzeSaju>[0]);
  • TypeScript interface defining the input parameters for the handler, matching the JSON schema.
    export interface AnalyzeSajuArgs {
      birthDate: string;
      birthTime: string;
      calendar?: CalendarType;
      isLeapMonth?: boolean;
      gender: Gender;
      analysisType: AnalysisType;
      
      // fortune용
      fortuneType?: FortuneAnalysisType;
      
      // school_compare용
      schools?: Array<'ziping' | 'dts' | 'qtbj' | 'modern' | 'shensha'>;
      
      // yongsin_method용
      method?: 'strength' | 'seasonal' | 'mediation' | 'disease';
    }
  • src/tools/index.ts:9-9 (registration)
    Export of the handler function, enabling import in tool-handler.ts.
    export { handleAnalyzeSaju } from './analyze_saju.js';
Behavior1/5

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

With no annotations provided, the description carries full burden for behavioral disclosure but provides none. It doesn't indicate whether this is a read-only analysis, whether it has side effects, what permissions might be required, rate limits, or what the output format will be. For a complex 9-parameter tool with no annotations, this complete lack of behavioral information is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise (one phrase in parentheses) but under-specified rather than efficiently informative. While it's not verbose, it fails to provide the essential context needed for a complex tool. The structure doesn't front-load the most critical information about what the tool actually does.

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

Completeness2/5

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

For a complex tool with 9 parameters, no annotations, and no output schema, the description is severely incomplete. It doesn't explain the tool's purpose, behavioral characteristics, output format, or parameter interdependencies. The agent would struggle to use this tool correctly without extensive trial and error or external knowledge about Korean astrology systems.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description lists analysis types that correspond to the 'analysisType' parameter values, adding some context beyond the schema's enum descriptions. However, with 67% schema description coverage and 9 total parameters, the description doesn't explain the relationships between parameters (e.g., that 'fortuneType' is only relevant when 'analysisType' is 'fortune'). It provides minimal value over what's already in the schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description '사주 분석 통합 (basic/fortune/yongsin/school_compare/yongsin_method)' is tautological - it essentially restates the tool name 'analyze_saju' with a list of analysis types. It doesn't specify what the tool actually does (e.g., 'performs Korean astrology analysis' or 'calculates and interprets four pillars of destiny'). The list of analysis types provides some differentiation from siblings, but the core purpose remains vague.

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

Usage Guidelines2/5

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

No guidance is provided about when to use this tool versus the sibling tools. While the description lists analysis types, it doesn't explain when to choose 'basic' vs 'fortune' vs other types, or how this comprehensive analysis tool relates to specialized siblings like 'get_daily_fortune' or 'get_fortune_by_period'. The agent must infer usage from parameter names alone.

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/hjsh200219/fortuneteller'

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