Skip to main content
Glama
bellsanct
by bellsanct

unequip_holding_item

Remove an equipped item from a character's hand slot and return it to inventory in the MCP Dungeon Game. Specify the slot (item1 or item2) and save key to manage equipment.

Instructions

特定のスロットから持ち物を外してインベントリに戻します。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slotYes持ち物スロット: item1 または item2
save_keyYesセーブキー

Implementation Reference

  • The implementation of the unequipHoldingItem tool, which removes an item from a player's equipment slot and adds it back to their inventory.
    export async function unequipHoldingItem(slot: 'item1' | 'item2', saveKey: string): Promise<string> {
      const data = await storage.load(saveKey);
    
      if (!data.player.name) {
        return "プレイヤーが見つかりません。先に'create_player'を実行してください。";
      }
    
      if (data.player.state === 'exploring') {
        return "ダンジョン探索中は装備を変更できません。\n探索完了後に装備を整えてください。";
      }
    
      const item = data.player.equipment[slot];
    
      if (!item) {
        return `${slot === 'item1' ? '持ち物1' : '持ち物2'}スロットには何も装備されていません。`;
      }
    
      // インベントリに移動
      data.player.itemInventory.push(item as Item);
      data.player.equipment[slot] = null;
    
      await storage.save(data, saveKey);
    
      return `${slot === 'item1' ? '持ち物1' : '持ち物2'}スロットから${(item as Item).name}を外しました。`;
    }
  • The MCP tool registration and input schema definition for unequip_holding_item.
    name: 'unequip_holding_item',
    description: '特定のスロットから持ち物を外してインベントリに戻します。',
    inputSchema: {
      type: 'object',
      properties: {
        slot: {
          type: 'string',
          description: '持ち物スロット: item1 または item2',
          enum: ['item1', 'item2'],
        },
        save_key: {
          type: 'string',
          description: 'セーブキー',
        },

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/bellsanct/mcp-dungeon-game'

If you have feedback or need assistance with the MCP directory API, please join our Discord server