Skip to main content
Glama
Hirao-Y

Poker Task Management MCP

by Hirao-Y

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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;
      }
    },
  • 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)すべてを返却します。'
      }
    },
  • 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 })();
    });

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