poker_getUnit
Retrieve all current unit settings (length, angle, density, radioactivity) for consistent measurement standardization in task management workflows.
Instructions
現在の単位設定を取得します(4つのキーすべてを返却)- 完全性保証
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp/handlers/unitHandlers.js:147-169 (handler)The handler function that implements the core logic for the 'poker_getUnit' tool. It retrieves the current unit settings from the TaskManager and returns them with success status.async getUnit(args) { try { logger.info('4キー完全単位設定取得開始'); // TaskManagerの4キー完全性保証取得機能を利用 const result = await taskManager.getUnit(); logger.info('4キー完全単位設定取得完了', { unit: result.unit, integrity: result.integrity }); return { success: true, message: '4キー完全単位設定を取得しました', ...result }; } catch (error) { logger.error('単位設定取得エラー', { error: error.message }); throw error; } },
- src/mcp/tools/unitTools.js:40-51 (schema)Defines the input schema, description, and metadata for the 'poker_getUnit' tool.{ name: 'poker_getUnit', description: '現在の単位設定を取得します(4つのキーすべてを返却)- 完全性保証', inputSchema: { type: 'object', properties: {}, required: [], additionalProperties: false, title: '4キー完全取得', description: '常に4つの単位キー(length, angle, density, radioactivity)すべてを返却します。' } },
- src/mcp/server.js:43-57 (registration)Registers the MCP tool call request handler, which maps the 'poker_getUnit' tool name to the 'getUnit' handler function by removing the '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 })(); });