Skip to main content
Glama
hjsh200219

Saju Fortune-Telling MCP Server

by hjsh200219

manage_settings

Configure interpretation settings for Saju fortune-telling analysis by adjusting preset modes or customizing individual calculation parameters.

Instructions

해석 설정 관리 (get/set)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes
presetNo
customNo

Implementation Reference

  • Core handler function that executes the manage_settings tool logic, supporting 'get' and 'set' actions for interpretation settings.
    export function handleManageSettings(args: ManageSettingsArgs): string {
      const { action, preset } = args;
      const settings = InterpretationSettings.getInstance();
    
      switch (action) {
        case 'get':
          return JSON.stringify(settings.getSettings());
    
        case 'set':
          if (preset) {
            settings.loadPreset(preset);
          }
          // custom은 현재 설정 구조와 맞지 않아 프리셋만 지원
          return JSON.stringify(settings.getSettings());
    
        default:
          throw new Error(`알 수 없는 action: ${action}`);
      }
    }
  • MCP tool schema definition for manage_settings, including inputSchema with action, preset, and custom properties.
    manage_settings: () => ({
      name: 'manage_settings',
      description: '해석 설정 관리 (get/set)',
      inputSchema: {
        type: 'object',
        properties: {
          action: { type: 'string', enum: ['get', 'set'] },
          preset: { type: 'string', enum: ['ziping', 'dts', 'qtbj', 'modern', 'shensha', 'balanced'] },
          custom: {
            type: 'object',
            properties: {
              ziping: { type: 'number', minimum: 0, maximum: 1 },
              dts: { type: 'number', minimum: 0, maximum: 1 },
              qtbj: { type: 'number', minimum: 0, maximum: 1 },
              modern: { type: 'number', minimum: 0, maximum: 1 },
              shensha: { type: 'number', minimum: 0, maximum: 1 },
            },
          },
        },
        required: ['action'],
      },
    }),
  • TypeScript interface defining the input arguments for the handleManageSettings function.
    export interface ManageSettingsArgs {
      action: SettingsAction;
    
      // set용
      preset?: string;
      custom?: {
        ziping?: number;
        dts?: number;
        qtbj?: number;
        modern?: number;
        shensha?: number;
      };
    }
  • Central tool dispatcher that routes 'manage_settings' calls to the specific handleManageSettings function.
    export async function handleToolCall(name: string, args: unknown): Promise<string> {
      switch (name) {
        case 'analyze_saju':
          return await handleAnalyzeSaju(args as Parameters<typeof handleAnalyzeSaju>[0]);
    
        case 'manage_settings':
          return handleManageSettings(args as Parameters<typeof handleManageSettings>[0]);
    
        case 'check_compatibility':
          return handleCheckCompatibility(args as Parameters<typeof handleCheckCompatibility>[0]);
    
        case 'convert_calendar':
          return handleConvertCalendar(args as Parameters<typeof handleConvertCalendar>[0]);
    
        case 'get_daily_fortune':
          return handleGetDailyFortune(args as Parameters<typeof handleGetDailyFortune>[0]);
    
        case 'get_dae_un':
          return handleGetDaeUn(args as Parameters<typeof handleGetDaeUn>[0]);
    
        case 'get_fortune_by_period':
          return handleGetFortuneByPeriod(args as Parameters<typeof handleGetFortuneByPeriod>[0]);
    
        default:
          throw new Error(`알 수 없는 도구: ${name}`);
      }
    }
  • Re-export of the handleManageSettings function for centralized imports.
    export { handleManageSettings } from './manage_settings.js';

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