Skip to main content
Glama
Hirao-Y

Poker Task Management MCP

by Hirao-Y

poker_changeOrderBuildupFactor

Adjusts the sequence of material buildup factors in task management to optimize workflow order and resource allocation.

Instructions

ビルドアップ係数の順序を変更します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
materialYes順序を変更する材料名
newIndexYes新しいインデックス位置

Implementation Reference

  • The MCP tool handler function 'changeOrderBuildupFactor' that validates input arguments (material and newIndex) and delegates to taskManager.changeOrderBuildupFactor for execution. Mapped to tool name 'poker_changeOrderBuildupFactor'.
    async changeOrderBuildupFactor(args) {
      try {
        if (!args.material) throw new ValidationError('材料名は必須です', 'material', args.material);
        if (typeof args.newIndex !== 'number') throw new ValidationError('新しいインデックスは数値です', 'newIndex', args.newIndex);
        const result = await taskManager.changeOrderBuildupFactor(args.material, args.newIndex);
        return { success: true, message: result };
      } catch (error) {
        logger.error('changeOrderBuildupFactorハンドラーエラー', { args, error: error.message });
        throw error;
      }
  • Input schema definition for the 'poker_changeOrderBuildupFactor' tool, specifying material (string) and newIndex (integer >=0).
    {
      name: 'poker_changeOrderBuildupFactor',
      description: 'ビルドアップ係数の順序を変更します',
      inputSchema: {
        type: 'object',
        properties: {
          material: {
            type: 'string',
            description: '順序を変更する材料名'
          },
          newIndex: {
            type: 'integer',
            description: '新しいインデックス位置',
            minimum: 0
          }
        },
        required: ['material', 'newIndex']
      }
    }
  • Dynamic tool registration and dispatch logic in MCP server: strips 'poker_' prefix from tool name to lookup corresponding handler function (e.g., 'poker_changeOrderBuildupFactor' -> 'changeOrderBuildupFactor').
    // ハンドラー名をツール名から生成(プレフィックス除去)
    const handlerName = name.replace('poker_', '');
    
    const handler = this.handlers[handlerName];
    if (!handler) {
      throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
    }
  • Registration of tool list handler that returns allTools array, which includes the schema for 'poker_changeOrderBuildupFactor' via buildupFactorTools.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools: allTools };
    });

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