Skip to main content
Glama
Hirao-Y

Poker Task Management MCP

by Hirao-Y

poker_updateBody

Modify geometric parameters of existing 3D bodies by updating coordinates, dimensions, and transformation properties for precise spatial adjustments.

Instructions

既存立体のパラメータを更新します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bottom_centerNo新しい底面中心座標 (x y z形式)
bottom_radiusNo新しい底面半径
centerNo新しい中心座標 (x y z形式)
depth_vectorNo新しい奥行きベクトル (x y z形式)
edge_1No新しいエッジ1ベクトル (x y z形式)
edge_2No新しいエッジ2ベクトル (x y z形式)
edge_3No新しいエッジ3ベクトル (x y z形式)
expressionNo新しい組み合わせ式
height_vectorNo新しい高さベクトル (x y z形式)
major_radiusNo新しい主半径
maxNo新しい最大座標 (x y z形式)
minNo新しい最小座標 (x y z形式)
minor_radius_horizontalNo新しい水平方向副半径
minor_radius_verticalNo新しい垂直方向副半径
nameYes更新する立体名
normalNo新しい法線ベクトル (x y z形式)
radiusNo新しい半径
radius_vector_1No新しい半径ベクトル1 (x y z形式)
radius_vector_2No新しい半径ベクトル2 (x y z形式)
radius_vector_3No新しい半径ベクトル3 (x y z形式)
top_radiusNo新しい上面半径
transformNo新しい変換名
vertexNo新しい頂点座標 (x y z形式)
width_vectorNo新しい幅ベクトル (x y z形式)

Implementation Reference

  • The handler function for the 'poker_updateBody' tool. Validates input, extracts updates, calls taskManager.updateBody, and handles errors.
    async updateBody(args) {
      try {
        if (!args.name) throw new ValidationError('立体名は必須です', 'name', args.name);
        const { name, ...updates } = args;
        const result = await taskManager.updateBody(name, updates);
        return { success: true, message: result };
      } catch (error) {
        logger.error('updateBodyハンドラーエラー', { args, error: error.message });
        
        // マニフェスト仕様のupdate専用エラーコード処理
        if (error.code === -32065) {
          return {
            success: false,
            error: error.message,
            details: {
              errorCode: error.code,
              suggestion: 'proposeBodyメソッドを使用してください',
              missingObject: args.name,
              objectType: '立体'
            }
          };
        }
        
        throw error;
      }
    },
  • Input schema definition for the 'poker_updateBody' tool, specifying parameters for updating body properties.
    {
      name: 'poker_updateBody',
      description: '既存立体のパラメータを更新します',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: '更新する立体名'
          },
          center: { type: 'string', description: '新しい中心座標 (x y z形式)' },
          radius: { type: 'number', description: '新しい半径', minimum: 0.001, maximum: 10000 },
          bottom_center: { type: 'string', description: '新しい底面中心座標 (x y z形式)' },
          height_vector: { type: 'string', description: '新しい高さベクトル (x y z形式)' },
          min: { type: 'string', description: '新しい最小座標 (x y z形式)' },
          max: { type: 'string', description: '新しい最大座標 (x y z形式)' },
          vertex: { type: 'string', description: '新しい頂点座標 (x y z形式)' },
          edge_1: { type: 'string', description: '新しいエッジ1ベクトル (x y z形式)' },
          edge_2: { type: 'string', description: '新しいエッジ2ベクトル (x y z形式)' },
          edge_3: { type: 'string', description: '新しいエッジ3ベクトル (x y z形式)' },
          expression: { type: 'string', description: '新しい組み合わせ式' },
          // TOR用パラメータ
          normal: { type: 'string', description: '新しい法線ベクトル (x y z形式)' },
          major_radius: { type: 'number', description: '新しい主半径', minimum: 0.001, maximum: 10000 },
          minor_radius_horizontal: { type: 'number', description: '新しい水平方向副半径', minimum: 0.001, maximum: 10000 },
          minor_radius_vertical: { type: 'number', description: '新しい垂直方向副半径', minimum: 0.001, maximum: 10000 },
          // ELL用パラメータ
          radius_vector_1: { type: 'string', description: '新しい半径ベクトル1 (x y z形式)' },
          radius_vector_2: { type: 'string', description: '新しい半径ベクトル2 (x y z形式)' },
          radius_vector_3: { type: 'string', description: '新しい半径ベクトル3 (x y z形式)' },
          // TRC用パラメータ
          bottom_radius: { type: 'number', description: '新しい底面半径', minimum: 0.001, maximum: 10000 },
          top_radius: { type: 'number', description: '新しい上面半径', minimum: 0.001, maximum: 10000 },
          // WED用パラメータ
          width_vector: { type: 'string', description: '新しい幅ベクトル (x y z形式)' },
          depth_vector: { type: 'string', description: '新しい奥行きベクトル (x y z形式)' },
          transform: { type: 'string', description: '新しい変換名' }
        },
        required: ['name']
      }
    },
  • Tool call dispatcher that maps 'poker_*' tool names to handlers by removing 'poker_' prefix and invoking the corresponding handler.
    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 })();
    });
  • The updateBody handler is registered via createBodyHandlers(taskManager) which returns an object containing this method, spread into allHandlers.
    async updateBody(args) {
      try {
        if (!args.name) throw new ValidationError('立体名は必須です', 'name', args.name);
        const { name, ...updates } = args;
        const result = await taskManager.updateBody(name, updates);
        return { success: true, message: result };
      } catch (error) {
        logger.error('updateBodyハンドラーエラー', { args, error: error.message });
        
        // マニフェスト仕様のupdate専用エラーコード処理
        if (error.code === -32065) {
          return {
            success: false,
            error: error.message,
            details: {
              errorCode: error.code,
              suggestion: 'proposeBodyメソッドを使用してください',
              missingObject: args.name,
              objectType: '立体'
            }
          };
        }
        
        throw error;
      }
    },

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