Skip to main content
Glama
bellsanct
by bellsanct

check_progress

Check current dungeon exploration progress and process results when complete using a save key.

Instructions

現在のダンジョン探索の進行状況を確認します。完了している場合は結果を処理します。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
save_keyYesセーブキー

Implementation Reference

  • The 'check_progress' tool handler function that calculates and returns the current status, estimated floors, and progress of a player currently exploring a dungeon.
    export async function checkProgress(saveKey: string): Promise<string> {
      const data = await storage.load(saveKey);
    
      if (!data.player.name) {
        return "プレイヤーが見つかりません。先に'create_player'を実行してください。";
      }
    
      if (!data.player.currentDungeon) {
        return "現在探索中のダンジョンはありません。\n\n'list_dungeons'で利用可能なダンジョンを確認できます。";
      }
    
      const now = Date.now();
      const { dungeonId, startTime, estimatedEndTime } = data.player.currentDungeon;
      const remaining = estimatedEndTime - now;
    
      if (remaining > 0) {
        // 探索中 - リアルタイム進行状況を計算
        const dungeon = getDungeonById(dungeonId);
    
        if (!dungeon) {
          return "エラー: ダンジョンデータが見つかりません。";
        }
    
        // 経過時間と進行度を計算
        const totalTime = estimatedEndTime - startTime;
        const elapsed = now - startTime;
        const progressPercentage = Math.min((elapsed / totalTime) * 100, 100);
    
        // 現在の階層を推定(線形補間)
        const currentFloor = Math.floor((dungeon.floors * progressPercentage) / 100);
        const displayFloor = Math.max(1, Math.min(currentFloor, dungeon.floors));
    
        // 残り時間表示
        const minutes = Math.ceil(remaining / 60000);
        const seconds = Math.ceil((remaining % 60000) / 1000);
    
        let output = `⚔️  ${dungeon.name}を探索中...\n\n`;
        output += `進行状況: ${progressPercentage.toFixed(1)}%\n`;
        output += `推定現在地: ${displayFloor}階 / ${dungeon.floors}階\n`;
        output += `残り時間: ${minutes}分${seconds}秒\n\n`;
    
        // プログレスバー
        const barLength = 20;
        const filledLength = Math.floor((progressPercentage / 100) * barLength);
        const bar = '█'.repeat(filledLength) + '░'.repeat(barLength - filledLength);
        output += `[${bar}] ${progressPercentage.toFixed(0)}%\n\n`;
    
        // 装備している持ち物の状態
        const playerStats = calculateTotalStats(data.player.equipment);
        const equippedHerb = data.player.equipment.item1?.type === 'herb'
          ? data.player.equipment.item1
          : data.player.equipment.item2?.type === 'herb'
          ? data.player.equipment.item2
          : undefined;
    
        const equippedCharm = data.player.equipment.item1?.type === 'charm'
          ? data.player.equipment.item1
          : data.player.equipment.item2?.type === 'charm'
          ? data.player.equipment.item2
          : undefined;
    
        if (equippedHerb || equippedCharm) {
          output += `持ち物状態:\n`;
          if (equippedHerb) {
            output += `  🌿 ${equippedHerb.name}: 待機中\n`;
          }
          if (equippedCharm) {
            output += `  🛡️ ${equippedCharm.name}: 待機中\n`;
          }
          output += '\n';
        }
    
        // 探索中の活動概要(推定)
        output += `=== 探索状況 ===\n`;
    
        // 進行度に基づいて推定される活動
        const estimatedBattles = Math.floor(displayFloor * 2); // 各階2戦想定
        const estimatedEvents = Math.floor(displayFloor * 0.3); // 30%程度でイベント
    
        output += `推定戦闘数: 約${estimatedBattles}回\n`;
        output += `推定イベント: 約${estimatedEvents}回\n\n`;
    
        // 現在までの階層表示と推定バトルログ
        if (displayFloor > 1) {
          output += `通過した階層:\n`;
          const maxDisplay = Math.min(displayFloor, 5); // 最新5階まで表示
          const startFloor = Math.max(1, displayFloor - maxDisplay + 1);
    
          for (let f = startFloor; f <= displayFloor; f++) {
            if (f === displayFloor) {
              output += `  → ${f}階 (探索中...)\n`;
            } else {
              output += `  ✓ ${f}階 (通過済み)\n`;
            }
          }
    
          if (displayFloor < dungeon.floors) {
            output += `  ... ${dungeon.floors - displayFloor}階が残っています\n`;
          }
          output += '\n';
    
          // 推定バトルログ(最新3階分)
          output += `最近の戦闘(推定):\n`;
          const recentFloors = Math.min(3, displayFloor);
          const logStartFloor = Math.max(1, displayFloor - recentFloors + 1);
    
          for (let f = logStartFloor; f <= displayFloor; f++) {
            // ランダムに敵を選択(実際はシミュレーション)
            const enemy1 = dungeon.enemies[Math.floor(Math.random() * dungeon.enemies.length)];
            const enemy2 = dungeon.enemies[Math.floor(Math.random() * dungeon.enemies.length)];
    
            if (f === displayFloor) {
              output += `  ${f}階: ${enemy1.name}と交戦中...\n`;
            } else {
              output += `  ${f}階: ${enemy1.name}, ${enemy2.name}を撃破\n`;
            }
          }
          output += '\n';
        }
    
        output += `💡 ヒント:\n`;
        output += `- 'view_status'でキャラクター情報を確認\n`;
        output += `- 完了後、もう一度'check_progress'で詳細な結果を確認\n`;
        output += `- 'view_battle_log'で完了後の戦闘ログを閲覧可能\n`;
    
        return output;
      }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions checking progress and processing results if completed, which hints at read and possible write operations, but doesn't clarify critical traits: whether it's safe (e.g., read-only vs. modifies data), requires specific permissions, has side effects (e.g., auto-saves), or handles errors. For a tool with potential mutation ('処理します' - process results) and no annotations, this is a significant gap in transparency.

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

Conciseness4/5

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

The description is concise and front-loaded, consisting of two clear sentences in Japanese. The first sentence states the primary action, and the second adds conditional behavior. There's no wasted text, but it could be slightly more structured (e.g., explicitly separating purpose and usage). It efficiently communicates core functionality without redundancy.

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

Completeness2/5

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

Given the complexity (dungeon progress checking with potential result processing), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what '進行状況' (progress) includes (e.g., steps completed, time elapsed), how results are processed (e.g., rewards awarded, state updates), or the return format. For a tool that might involve both read and write operations, more detail is needed to guide an AI agent effectively.

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 description adds no parameter-specific information beyond what the input schema provides. The schema has 100% description coverage for its single parameter 'save_key' (described as 'セーブキー' - save key), so the baseline is 3. The tool description doesn't explain what 'save_key' represents in context (e.g., a game save identifier), its format, or how it relates to dungeon progress, so it doesn't enhance parameter understanding.

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: '現在のダンジョン探索の進行状況を確認します。完了している場合は結果を処理します。' (Check the current dungeon exploration progress. If completed, process the results). It specifies the verb ('確認します' - check/confirm) and resource ('ダンジョン探索の進行状況' - dungeon exploration progress), making it distinct from siblings like 'start_dungeon' or 'list_dungeons'. However, it doesn't explicitly differentiate from all siblings (e.g., 'view_status' might overlap in checking status), so it's not a perfect 5.

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

Usage Guidelines2/5

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

The description provides minimal guidance on when to use this tool. It implies usage during or after dungeon exploration ('現在のダンジョン探索' - current dungeon exploration), but doesn't specify prerequisites (e.g., must have started a dungeon), exclusions (e.g., don't use if no dungeon is active), or alternatives (e.g., vs. 'view_status' for general player status). Without explicit when/when-not instructions or named alternatives, it falls short of higher scores.

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