Skip to main content
Glama
hjsh200219

Saju Fortune-Telling MCP Server

by hjsh200219

get_daily_fortune

Retrieve personalized daily fortune predictions using Korean Saju astrology based on birth details, gender, and target date to guide daily decisions.

Instructions

일일 운세

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
birthDateYes
birthTimeYes
calendarNosolar
isLeapMonthNo
genderYes
targetDateYesYYYY-MM-DD

Implementation Reference

  • The core handler function implementing the logic for the 'get_daily_fortune' tool. Validates input date, computes saju data, generates daily fortune using helper, and returns JSON.
    export function handleGetDailyFortune(args: GetDailyFortuneArgs): string {
      const {
        birthDate,
        birthTime,
        calendar = 'solar',
        isLeapMonth = false,
        gender,
        targetDate,
      } = args;
    
      // 입력 검증
      if (!isValidDate(targetDate)) {
        throw new Error(`유효하지 않은 날짜 형식입니다: ${targetDate}. YYYY-MM-DD 형식을 사용하세요.`);
      }
    
      // 사주 계산
      const sajuData = calculateSaju(birthDate, birthTime, calendar, isLeapMonth, gender);
    
      // 일일 운세 생성
      const dailyFortune = getDailyFortune(sajuData, targetDate);
    
      return JSON.stringify(dailyFortune);
    }
  • MCP tool schema definition for 'get_daily_fortune', including input schema and metadata.
    get_daily_fortune: () => ({
      name: 'get_daily_fortune',
      description: '일일 운세',
      inputSchema: {
        type: 'object',
        properties: {
          birthDate: { type: 'string' },
          birthTime: { type: 'string' },
          calendar: { type: 'string', enum: ['solar', 'lunar'], default: 'solar' },
          isLeapMonth: { type: 'boolean', default: false },
          gender: { type: 'string', enum: ['male', 'female'] },
          targetDate: { type: 'string', description: 'YYYY-MM-DD' },
        },
        required: ['birthDate', 'birthTime', 'gender', 'targetDate'],
      },
    }),
  • Registration in the main tool dispatcher/switch statement that routes 'get_daily_fortune' calls to the handler function.
    case 'get_daily_fortune':
      return handleGetDailyFortune(args as Parameters<typeof handleGetDailyFortune>[0]);
  • Zod validation schema for GetDailyFortune input parameters.
    export const GetDailyFortuneSchema = z.object({
      birthDate: DateSchema.describe('생년월일 (YYYY-MM-DD)'),
      birthTime: TimeSchema.describe('출생 시간 (HH:mm)'),
      targetDate: DateSchema.describe('운세를 볼 날짜 (YYYY-MM-DD)'),
      calendar: CalendarTypeSchema.default('solar').describe('달력 타입'),
      isLeapMonth: z.boolean().default(false).describe('음력 윤달 여부'),
      gender: GenderSchema.describe('성별')
    });
  • Helper function that generates the daily fortune data based on saju and target date using seeded random for variability.
    export function getDailyFortune(sajuData: SajuData, date: string): DailyFortune {
      const targetDate = new Date(date);
      const seed = generateDateSeed(targetDate, sajuData);
      const dayElement = sajuData.day.stemElement;
    
      // 날짜 기반 운세 변동
      const dateNumber = targetDate.getDate();
      const monthNumber = targetDate.getMonth() + 1;
    
      const variance = ((dateNumber + monthNumber) % 20) - 10; // -10 ~ +10
    
      // 시드 기반 변동 (-10 ~ +10)
      const getVariance = (offset: number) => {
        return (seededRandom(seed + offset) - 0.5) * 20;
      };
    
      return {
        date,
        overallLuck: Math.round(Math.min(100, Math.max(30, 70 + variance))),
        wealthLuck: Math.round(Math.min(100, Math.max(30, 65 + variance + getVariance(1)))),
        careerLuck: Math.round(Math.min(100, Math.max(30, 75 + variance + getVariance(2)))),
        healthLuck: Math.round(Math.min(100, Math.max(30, 70 + variance + getVariance(3)))),
        loveLuck: Math.round(Math.min(100, Math.max(30, 68 + variance + getVariance(4)))),
        luckyColor: WUXING_DATA[dayElement].color[0]!,
        luckyDirection: WUXING_DATA[dayElement].direction,
        advice: `오늘은 ${dayElement} 기운이 강한 날입니다. ${WUXING_DATA[dayElement].personality[0]}하게 행동하세요.`,
      };
    }
Behavior1/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers none. It doesn't indicate whether this is a read-only operation, whether it has side effects, what authentication might be required, rate limits, or what the output format might be. For a tool with 6 parameters that presumably performs fortune calculation, this lack of behavioral context is severely 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 at just two Korean characters, which could be seen as efficient. However, this brevity comes at the cost of being severely under-specified rather than truly concise. While it's front-loaded (there's only one element), it doesn't earn its place by providing necessary information.

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

Completeness1/5

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

Given the complexity (6 parameters including birth details, calendar types, and gender), complete lack of annotations, and no output schema, the description is completely inadequate. It provides no information about what the tool actually does, how to use it properly, what it returns, or how it differs from sibling tools. This leaves the agent with insufficient context to effectively invoke the tool.

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

Parameters1/5

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

Schema description coverage is only 17% (only 'targetDate' has a description), leaving 5 parameters completely undocumented in the schema. The description '일일 운세' adds zero information about what any parameters mean, their expected formats beyond what's in the schema, or how they influence the fortune calculation. This fails to compensate for the poor schema coverage.

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 '일일 운세' (daily fortune) is a tautology that restates the tool name 'get_daily_fortune' in Korean without adding any meaningful clarification. It doesn't specify what action the tool performs (e.g., 'retrieves', 'calculates', 'generates') or what resource it operates on beyond the obvious. While it's clear this is about daily fortunes, it fails to distinguish this tool from sibling tools like 'get_fortune_by_period' or 'analyze_saju'.

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

Usage Guidelines1/5

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

The description provides absolutely no guidance on when to use this tool versus alternatives. There's no mention of context, prerequisites, or comparison to sibling tools like 'get_fortune_by_period' (which might handle different time ranges) or 'analyze_saju' (which might provide different types of fortune analysis). The agent receives no help in selecting the appropriate tool for a given scenario.

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