Skip to main content
Glama
Vic563

Minesweeper MCP Server

by Vic563

get_board

Retrieve the current state and visual layout of a Minesweeper game board to track progress and plan moves.

Instructions

Get the current state and visual representation of a Minesweeper board

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boardIdYesID of the board to display

Implementation Reference

  • Handler for the 'get_board' tool. Extracts boardId from input arguments, calls MinesweeperGame.getBoardDisplay(boardId), and returns the textual board display.
    case 'get_board': {
      const { boardId } = args as { boardId: string };
      const display = this.game.getBoardDisplay(boardId);
    
      return {
        content: [
          {
            type: 'text',
            text: display,
          },
        ],
      };
    }
  • src/index.ts:128-141 (registration)
    Tool registration for 'get_board' in the listTools response, including name, description, and input schema requiring a boardId string.
    {
      name: 'get_board',
      description: 'Get the current state and visual representation of a Minesweeper board',
      inputSchema: {
        type: 'object',
        properties: {
          boardId: {
            type: 'string',
            description: 'ID of the board to display',
          },
        },
        required: ['boardId'],
      },
    },
  • Core helper function getBoardDisplay that retrieves the GameBoard by ID and formats it into a human-readable ASCII art string with board info, coordinates, and symbols for cells (. hidden, F flagged, * mine, numbers, space empty).
    getBoardDisplay(boardId: string): string {
      const board = this.boards.get(boardId);
      if (!board) {
        throw new Error(`Board with id ${boardId} not found`);
      }
    
      let display = `Minesweeper Board: ${boardId}\n`;
      display += `Size: ${board.width}x${board.height}, Mines: ${board.mineCount}\n`;
      display += `Status: ${board.gameState}\n`;
      
      if (board.endTime) {
        const duration = Math.round((board.endTime - board.startTime) / 1000);
        display += `Duration: ${duration}s\n`;
      }
      
      display += '\n';
    
      // Add column numbers
      display += '   ';
      for (let x = 0; x < board.width; x++) {
        display += (x % 10).toString().padStart(2);
      }
      display += '\n';
    
      for (let y = 0; y < board.height; y++) {
        display += y.toString().padStart(2) + ' ';
        for (let x = 0; x < board.width; x++) {
          const cell = board.cells[y][x];
          let symbol = '.';
          
          if (cell.isFlagged) {
            symbol = 'F';
          } else if (cell.isRevealed) {
            if (cell.isMine) {
              symbol = '*';
            } else if (cell.neighborMines > 0) {
              symbol = cell.neighborMines.toString();
            } else {
              symbol = ' ';
            }
          }
          
          display += symbol.padStart(2);
        }
        display += '\n';
      }
    
      return display;
    }
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 states the tool retrieves 'current state and visual representation,' implying a read-only operation, but doesn't specify critical details like whether it requires authentication, rate limits, error handling (e.g., invalid boardId), or the format of the output (e.g., text, grid, JSON). For a tool with no annotation coverage, this leaves significant gaps in understanding how it behaves beyond its basic function.

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 a single, efficient sentence: 'Get the current state and visual representation of a Minesweeper board.' It front-loads the core purpose without unnecessary words, making it easy to parse. However, it could be slightly more structured by explicitly separating state retrieval from visual aspects, but overall, it earns its place with minimal waste.

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 context—no annotations, no output schema, and a simple input schema—the description is incomplete. It covers the basic purpose but lacks details on behavioral traits (e.g., error handling, output format), usage guidelines, and how it fits with sibling tools. For a tool in a Minesweeper game server with multiple interaction options, this leaves too much unspecified, making it inadequate for full agent understanding.

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 input schema has 100% description coverage, with the single parameter 'boardId' documented as 'ID of the board to display.' The description adds no additional meaning beyond this, such as examples of valid IDs or constraints. Since the schema already fully describes the parameter, the baseline score of 3 is appropriate—the description doesn't compensate but doesn't need to, given the high schema coverage.

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: 'Get the current state and visual representation of a Minesweeper board.' It specifies the verb ('Get') and resource ('Minesweeper board'), and while it doesn't explicitly differentiate from siblings like 'list_boards' or 'reveal_cell', the focus on retrieving a specific board's state and visual representation is distinct enough to avoid vagueness. However, it doesn't fully articulate how it differs from potential overlaps (e.g., 'list_boards' might provide summaries vs. this tool's detailed view), so it falls short of a 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 no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a valid boardId), exclusions (e.g., not for modifying the board), or comparisons to sibling tools like 'list_boards' (for overviews) or 'reveal_cell' (for interacting with cells). Without such context, users might struggle to select the correct tool in a Minesweeper game scenario, making this inadequate beyond basic purpose.

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/Vic563/mindsweeper-mcp'

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