Skip to main content
Glama
Hirao-Y

Poker Task Management MCP

by Hirao-Y

poker_updateBuildupFactor

Updates buildup factor settings for materials by modifying slant correction and finite medium correction parameters in task management systems.

Instructions

既存ビルドアップ係数の設定を更新します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
materialYes更新する材料名
use_finite_medium_correctionNo新しい有限媒体補正設定
use_slant_correctionNo新しいスラント補正設定

Implementation Reference

  • Tool schema and metadata definition for 'poker_updateBuildupFactor', including input validation schema.
    { name: 'poker_updateBuildupFactor', description: '既存ビルドアップ係数の設定を更新します', inputSchema: { type: 'object', properties: { material: { type: 'string', description: '更新する材料名' }, use_slant_correction: { type: 'boolean', description: '新しいスラント補正設定' }, use_finite_medium_correction: { type: 'boolean', description: '新しい有限媒体補正設定' } }, required: ['material'] } },
  • MCP tool handler function for updateBuildupFactor. Validates input, calls TaskManager.updateBuildupFactor, handles specific errors.
    async updateBuildupFactor(args) { try { if (!args.material) throw new ValidationError('材料名は必須です', 'material', args.material); const { material, ...updates } = args; const result = await taskManager.updateBuildupFactor(material, updates); return { success: true, message: result }; } catch (error) { logger.error('updateBuildupFactorハンドラーエラー', { args, error: error.message }); // マニフェスト仕様のupdate専用エラーコード処理 if (error.code === -32071) { return { success: false, error: error.message, details: { errorCode: error.code, suggestion: 'proposeBuildupFactorメソッドを使用してください', missingObject: args.material, objectType: 'ビルドアップ係数' } }; } throw error; } },
  • MCP server registration and dispatch logic. Maps 'poker_*' tool names to handlers by stripping 'poker_' prefix.
    this.server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; logger.info(`MCP Tool実行: ${name}`, { args }); // ハンドラー名をツール名から生成(プレフィックス除去) const handlerName = name.replace('poker_', ''); const handler = this.handlers[handlerName]; if (!handler) { throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`); } return await safeExecute(async () => handler(args), { tool: name })(); });
  • TaskManager method that adds a pending change for updating buildup factor settings.
    async updateBuildupFactor(material, updates) { try { if (!material) throw new ValidationError('materialは必須です', 'material', material); // 既存更新専用チェック - マニフェスト仕様準拠 this.validateUpdatePrerequisites('buildup_factor', material, (m) => this.findBuildupFactorByMaterial(m)); await this.dataManager.addPendingChange({ action: 'updateBuildupFactor', data: { material, ...updates } }); logger.info('ビルドアップ係数更新を提案しました', { material, updates }); return `提案: ビルドアップ係数 ${material} の更新を保留しました`; } catch (error) { logger.error('ビルドアップ係数更新エラー', { material, error: error.message }); throw error; } }
  • DataManager logic to apply the updateBuildupFactor pending change by modifying the buildup_factor array in data.
    case 'updateBuildupFactor': if (this.data.buildup_factor) { const buildup = this.data.buildup_factor.find(bf => bf.material === data.material); if (buildup) { if ('use_slant_correction' in data) { buildup.use_slant_correction = data.use_slant_correction; } if ('use_finite_medium_correction' in data) { buildup.use_finite_medium_correction = data.use_finite_medium_correction; } } } break;

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/Hirao-Y/poker_mcp'

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