|
| 1 | +<?php |
| 2 | + |
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +namespace App\Infrastructure\Mcp\Prompts; |
| 6 | + |
| 7 | +use Mcp\Capability\Attribute\McpPrompt; |
| 8 | + |
| 9 | +#[McpPrompt( |
| 10 | + name: 'room_report', |
| 11 | + description: 'Generate a comprehensive and nicely formatted report about a game room', |
| 12 | +)] |
| 13 | +readonly class ReportPrompt |
| 14 | +{ |
| 15 | + /** |
| 16 | + * Generate a prompt to build a room report. |
| 17 | + * |
| 18 | + * @param string $roomId The ID or code of the room to report on |
| 19 | + */ |
| 20 | + public function __invoke(string $roomId): array |
| 21 | + { |
| 22 | + return [ |
| 23 | + 'role' => 'user', |
| 24 | + // phpcs:ignore Squiz.Arrays.ArrayDeclaration.NoComma |
| 25 | + 'content' => <<<PROMPT |
| 26 | +You are tasked with generating a comprehensive report about a game room in the Killer game application. |
| 27 | +
|
| 28 | +**Instructions:** |
| 29 | +
|
| 30 | +1. Use the `room_report` tool with the room ID: {$roomId} |
| 31 | +2. The tool will return the following information: |
| 32 | + - Room ID and name |
| 33 | + - Game status (IN_GAME, PENDING, or ENDED) |
| 34 | + - Total number of players |
| 35 | + - Number of alive players |
| 36 | + - Total number of missions |
| 37 | + - Creation date and end date |
| 38 | + - Whether the game is game-mastered |
| 39 | + - Winner information (if any) |
| 40 | +
|
| 41 | +3. Present the information in a clear, well-formatted manner following this structure: |
| 42 | +
|
| 43 | +**Room Report Format:** |
| 44 | +
|
| 45 | +``` |
| 46 | +# Game Room Report: [Room Name] |
| 47 | +
|
| 48 | +## General Information |
| 49 | +- **Room ID:** [ID] |
| 50 | +- **Room Name:** [Name] |
| 51 | +- **Created:** [Date] |
| 52 | +- **End Date:** [Date] |
| 53 | +- **Game Master Mode:** [Yes/No] |
| 54 | +
|
| 55 | +## Game Status |
| 56 | +- **Status:** [IN_GAME/PENDING/ENDED] |
| 57 | +- **Is Currently Playing:** [Yes/No] |
| 58 | +
|
| 59 | +## Players Overview |
| 60 | +- **Total Players:** [X] |
| 61 | +- **Alive Players:** [X] |
| 62 | +- **Eliminated Players:** [X] |
| 63 | +
|
| 64 | +## Missions |
| 65 | +- **Total Missions:** [X] |
| 66 | +
|
| 67 | +## Game Outcome |
| 68 | +- **Winner:** [Player name or "No winner yet"] |
| 69 | +``` |
| 70 | +
|
| 71 | +4. Add contextual insights such as: |
| 72 | + - If the game is IN_GAME, mention the current state of competition |
| 73 | + - If many players have been eliminated, note the intensity of the game |
| 74 | + - If the game hasn't started (PENDING), mention it's waiting to begin |
| 75 | + - If the game has ENDED, highlight the winner |
| 76 | +
|
| 77 | +5. Use clear formatting with headers, bullet points, and emphasis where appropriate |
| 78 | +
|
| 79 | +**Now generate the report for room: {$roomId}** |
| 80 | +PROMPT, |
| 81 | + ]; |
| 82 | + } |
| 83 | +} |
0 commit comments