Skip to main content
Glama
bellsanct
by bellsanct

shop_inventory

Display shop inventory to purchase equipment and items for dungeon exploration. View anytime, buy only during idle phases.

Instructions

ショップで販売中の商品一覧を表示します。装備と持ち物アイテムを購入できます。探索中でも閲覧可能ですが、購入は待機中のみです。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
save_keyYesセーブキー

Implementation Reference

  • The actual implementation of the shop_inventory tool logic.
    export async function getShopInventory(saveKey: string): Promise<string> {
      const gameData = await storage.load(saveKey);
    
      // 探索中は閲覧のみ可能(購入は不可)
      const canBuy = gameData.player.state === 'idle';
      const statusMessage = canBuy
        ? `所持金: ${gameData.player.gold}G\n`
        : `⚠️ 探索中のため購入できません(閲覧のみ)\n所持金: ${gameData.player.gold}G\n`;
    
      let output = '=== 🏪 ショップ ===\n\n' + statusMessage + '\n';
    
      // 装備セクション
      output += '【装備】\n';
    
      const equipmentByRarity = {
        common: SHOP_EQUIPMENT.filter(eq => eq.rarity === 'common'),
        rare: SHOP_EQUIPMENT.filter(eq => eq.rarity === 'rare'),
        epic: SHOP_EQUIPMENT.filter(eq => eq.rarity === 'epic')
      };
    
      for (const [rarity, items] of Object.entries(equipmentByRarity)) {
        if (items.length === 0) continue;
    
        const rarityName = rarity === 'common' ? 'コモン' : rarity === 'rare' ? 'レア' : 'エピック';
        output += `\n[${rarityName}]\n`;
    
        for (const eq of items) {
          const typeIcon = eq.type === 'weapon' ? '⚔️' : eq.type === 'shield' ? '🛡️' : eq.type === 'armor' ? '🎽' : '💍';
          const canAfford = gameData.player.gold >= eq.price ? '✅' : '❌';
          output += `${canAfford} ${typeIcon} ${eq.name} - ${eq.price}G\n`;
          output += `   ID: ${eq.id}\n`;
          output += `   攻撃+${eq.stats.attack} 防御+${eq.stats.defense} 速度+${eq.stats.speed} 運+${eq.stats.luck}\n`;
        }
      }
    
      // 持ち物アイテムセクション
      output += '\n【持ち物アイテム】\n';
      for (const item of SHOP_ITEMS) {
        const typeIcon = item.type === 'herb' ? '🌿' : '🧿';
        const canAfford = gameData.player.gold >= item.price ? '✅' : '❌';
        output += `${canAfford} ${typeIcon} ${item.name} - ${item.price}G\n`;
        output += `   ID: ${item.id}\n`;
        output += `   ${item.description}\n`;
      }
    
      output += '\n購入方法: buy_item ツールで item_id を指定してください\n';
    
      return output;
    }
  • src/index.ts:248-255 (registration)
    Registration of the shop_inventory tool in the MCP tools list.
    name: 'shop_inventory',
    description: 'ショップで販売中の商品一覧を表示します。装備と持ち物アイテムを購入できます。探索中でも閲覧可能ですが、購入は待機中のみです。',
    inputSchema: {
      type: 'object',
      properties: {
        save_key: {
          type: 'string',
          description: 'セーブキー',
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains key behavioral traits: the tool displays items, allows purchasing of equipment and inventory items, and has timing restrictions for purchases. However, it doesn't cover other important aspects like authentication needs, rate limits, error conditions, or what happens after a purchase.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise and well-structured in just two sentences. The first sentence states the core functionality, and the second adds important behavioral constraints. Every word earns its place with zero wasted text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (displaying and enabling purchases), no annotations, and no output schema, the description provides adequate but incomplete coverage. It explains what the tool does and key usage constraints, but lacks details about return values, error handling, and complete behavioral context that would be needed for optimal agent usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already documents the single 'save_key' parameter. The description doesn't add any additional meaning or context about this parameter beyond what the schema provides. The baseline score of 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: to display items available for purchase in a shop, distinguishing it from sibling tools like 'view_inventory' or 'buy_item'. It specifies both browsing and purchasing capabilities, though it doesn't explicitly contrast with all siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for usage: it can be browsed during exploration but purchases are only allowed while waiting. However, it doesn't explicitly state when to use this tool versus alternatives like 'buy_item' or 'view_inventory', nor does it mention any prerequisites or exclusions beyond the purchase timing constraint.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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