Skip to main content
Glama
Hirao-Y

Poker Task Management MCP

by Hirao-Y

poker_proposeUnit

Propose default unit settings for length, angle, density, and radioactivity when missing from YAML configuration files to ensure complete unit specification.

Instructions

単位設定セクションを提案します(YAMLファイルに未存在の場合のみ)- 4キー完全性保証

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
angleYes角度の単位radian
densityYes密度の単位g/cm3
lengthYes長さの単位cm
radioactivityYes放射能の単位Bq

Implementation Reference

  • MCP tool handler function that implements the core logic for 'poker_proposeUnit', delegating to taskManager.proposeUnit while handling errors and logging.
    async proposeUnit(args) { try { const { length, angle, density, radioactivity } = args; logger.info('4キー完全単位設定提案開始', { length, angle, density, radioactivity }); // TaskManagerの4キー完全性保証機能を利用 const result = await taskManager.proposeUnit(length, angle, density, radioactivity); logger.info('4キー完全単位設定提案完了', { units: { length, angle, density, radioactivity } }); return { success: true, message: result, unit: { length, angle, density, radioactivity, integrity: '4-key-complete' } }; } catch (error) { logger.error('単位設定提案エラー', { args, error: error.message }); // マニフェスト仕様のpropose専用エラーコード処理 if (error.code === -32086) { return { success: false, error: error.message, details: { errorCode: error.code, suggestion: 'updateUnitメソッドを使用してください', existingObject: 'unit', objectType: '単位設定' } }; } throw error; } },
  • Input schema and metadata definition for the 'poker_proposeUnit' tool.
    { name: 'poker_proposeUnit', description: '単位設定セクションを提案します(YAMLファイルに未存在の場合のみ)- 4キー完全性保証', inputSchema: { type: 'object', properties: { length: { type: 'string', enum: ['m', 'cm', 'mm'], description: '長さの単位', default: 'cm' }, angle: { type: 'string', enum: ['radian', 'degree'], description: '角度の単位', default: 'radian' }, density: { type: 'string', enum: ['g/cm3'], description: '密度の単位', default: 'g/cm3' }, radioactivity: { type: 'string', enum: ['Bq'], description: '放射能の単位', default: 'Bq' } }, required: ['length', 'angle', 'density', 'radioactivity'], additionalProperties: false, title: '4キー必須単位構造', description: '全4キー(length, angle, density, radioactivity)が必須です。部分指定は不可。' }
  • Dynamic registration of the CallToolRequestHandler that maps 'poker_proposeUnit' to the 'proposeUnit' handler function via name replacement.
    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 })(); });

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