Skip to main content
Glama
hjsh200219

Saju Fortune-Telling MCP Server

by hjsh200219

get_dae_un

Calculate your 10-year destiny cycle in Korean Saju astrology using birth date, time, gender, and calendar preferences to understand major life phases.

Instructions

10년 대운

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
birthDateYes
birthTimeYes
calendarNosolar
isLeapMonthNo
genderYes

Implementation Reference

  • The primary handler function implementing the 'get_dae_un' tool logic. Calculates saju data, daeun periods, formats output for current age (if specified) and lists upcoming daeun periods.
    export function handleGetDaeUn(args: GetDaeUnArgs): string {
      try {
        const {
          birthDate,
          birthTime,
          calendar = 'solar',
          isLeapMonth = false,
          gender,
          age,
          limit = 10,
        } = args;
    
        // 1. 사주 계산
        const sajuData = calculateSaju(birthDate, birthTime, calendar, isLeapMonth, gender);
    
        // 2. 대운 계산
        const daeUnPeriods = calculateDaeUn(sajuData);
    
        let result = '';
    
        // 3. 특정 나이의 대운 조회
        if (age !== undefined) {
          const currentDaeUn = getDaeUnAtAge(sajuData, age);
    
          if (currentDaeUn) {
            result += `## ${age}세 대운\n\n`;
            result += formatDaeUn(currentDaeUn) + '\n\n';
            result += `### 대운 분석\n\n`;
            result += `- **천간**: ${currentDaeUn.stem} (${currentDaeUn.stemElement})\n`;
            result += `  - 상반기 5년(${currentDaeUn.startAge}-${currentDaeUn.startAge + 4}세)의 주요 운세 영향\n\n`;
            result += `- **지지**: ${currentDaeUn.branch} (${currentDaeUn.branchElement})\n`;
            result += `  - 하반기 5년(${currentDaeUn.startAge + 5}-${currentDaeUn.endAge}세)의 주요 운세 영향\n\n`;
          } else {
            result += `${age}세에 해당하는 대운 정보를 찾을 수 없습니다.\n\n`;
          }
        }
    
        // 4. 전체 대운 목록
        result += `## 전체 대운 목록\n\n`;
        result += formatDaeUnList(daeUnPeriods, limit);
    
        return result;
      } catch (error) {
        if (error instanceof Error) {
          return `오류가 발생했습니다: ${error.message}`;
        }
        return '알 수 없는 오류가 발생했습니다.';
      }
    }
  • Tool registration in the central tool dispatcher switch statement, routing 'get_dae_un' calls to the specific handler.
    case 'get_dae_un':
      return handleGetDaeUn(args as Parameters<typeof handleGetDaeUn>[0]);
  • Tool definition including name, description, and input schema registration for lazy-loading in the MCP tool factory.
    get_dae_un: () => ({
      name: 'get_dae_un',
      description: '10년 대운',
      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'] },
        },
        required: ['birthDate', 'birthTime', 'gender'],
      },
    }),
  • Zod schema for input validation of the get_dae_un tool parameters.
    export const GetDaeUnSchema = z.object({
      birthDate: DateSchema.describe('생년월일 (YYYY-MM-DD)'),
      birthTime: TimeSchema.describe('출생 시간 (HH:mm)'),
      calendar: CalendarTypeSchema.default('solar').describe('달력 타입'),
      isLeapMonth: z.boolean().default(false).describe('음력 윤달 여부'),
      gender: GenderSchema.describe('성별')
    });
  • Re-export of the handler function from the tools index module, making it available for import in tool-handler.ts.
    export { handleGetDaeUn } from './get_dae_un.js';
Behavior1/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 of behavioral disclosure. The description '10년 대운' gives no indication of what the tool does, whether it's a read or write operation, what permissions might be required, what the output format might be, or any rate limits or constraints. This is completely inadequate for a tool with 5 parameters that appears to perform fortune calculation.

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

Conciseness2/5

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

While technically concise with just three Korean characters, this represents severe under-specification rather than effective brevity. The description doesn't earn its place as it provides no useful information about the tool's function. A truly concise description would still convey essential purpose while being brief.

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?

This is a 5-parameter tool with no annotations, no output schema, and 0% schema description coverage. The description '10년 대운' (which translates to '10-year great fortune') is completely inadequate for understanding what the tool does, how to use it, what inputs it requires, or what it returns. The agent would have no basis for selecting or invoking this tool correctly.

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 0%, meaning none of the 5 parameters have descriptions in the schema. The tool description provides absolutely no information about what parameters are needed or what they mean. Parameters like 'birthDate', 'birthTime', 'calendar', 'isLeapMonth', and 'gender' are completely undocumented in both schema and description, leaving the agent with no guidance on how to use them.

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

Purpose1/5

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

The description '10년 대운' is a tautology that restates the tool name in Korean without providing any functional explanation. It doesn't specify what action the tool performs or what resource it operates on. The description fails to distinguish this tool from its siblings like 'get_daily_fortune' or 'get_fortune_by_period' that also appear to provide fortune-related outputs.

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 no guidance on when to use this tool versus alternatives. There's no mention of context, prerequisites, or comparisons to sibling tools like 'analyze_saju' or 'check_compatibility'. The agent receives no information about appropriate use cases or when other tools might be more suitable.

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