Skip to main content
Glama
Hirao-Y

Poker Task Management MCP

by Hirao-Y

poker_deleteBody

Remove a task body from the task management system with dependency validation to prevent orphaned subtasks or broken workflows.

Instructions

立体を削除します(依存関係チェック付き)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes削除する立体名

Implementation Reference

  • Tool schema definition for poker_deleteBody, including input validation for the body name.
    {
      name: 'poker_deleteBody',
      description: '立体を削除します(依存関係チェック付き)',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: '削除する立体名'
          }
        },
        required: ['name']
      }
    }
  • The main handler function for the poker_deleteBody tool. Validates input, calls taskManager.deleteBody, and returns success or throws error.
    async deleteBody(args) {
      try {
        if (!args.name) throw new ValidationError('立体名は必須です', 'name', args.name);
        const result = await taskManager.deleteBody(args.name);
        return { success: true, message: result };
      } catch (error) {
        logger.error('deleteBodyハンドラーエラー', { args, error: error.message });
        throw error;
      }
    }
  • Core implementation that removes the specified body from the data.body array in memory. This is executed when pending changes are applied.
    case 'delete_body':
      if (this.data.body) {
        const bodyIndex = this.data.body.findIndex(b => b.name === data.name);
        if (bodyIndex !== -1) {
          this.data.body.splice(bodyIndex, 1);
        }
      }
      break;
  • Registers the body handlers (including deleteBody) into the handlers object used by the server.
    export function createAllHandlers(taskManager) {
      return {
        // 立体操作
        ...createBodyHandlers(taskManager),
  • Registers the generic tool call handler on the MCP server, which maps 'poker_deleteBody' to 'deleteBody' handler dynamically.
    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