Skip to main content
Glama
jimmcq
by jimmcq

start_game

Initiate a lemonade stand simulation game with dynamic weather, pricing strategies, and inventory management through the MCP server.

Instructions

Start a new lemonade stand game

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'start_game' tool. Generates a unique game ID using uuidv4, creates initial game state with createNewGame(), stores it in the games Map, and returns the gameId and initial state as JSON text content.
    case 'start_game': { const gameId = uuidv4(); const initialGameState = createNewGame(); games.set(gameId, initialGameState); return { content: [{ type: "text", text: JSON.stringify({ gameId, gameState: initialGameState }) }] }; }
  • server.js:237-244 (registration)
    Registration of the 'start_game' tool in the ListTools response, including its name, description, and empty input schema (no parameters required).
    { name: "start_game", description: "Start a new lemonade stand game", inputSchema: { type: "object", properties: {} } },
  • Input schema for 'start_game' tool, defining it as an object with no properties (parameterless tool).
    inputSchema: { type: "object", properties: {} }
  • Helper function called by the start_game handler to initialize the new game state with starting values, empty inventory, default price, generated weather, and 'buying' status.
    const createNewGame = () => ({ day: 1, money: 20.00, inventory: { cups: 0, lemons: 0, sugar: 0, ice: 0 }, purchaseHistory: [], // Keep track of purchases for proper cost calculation pricePerCup: 0.25, weather: generateWeather(), status: 'buying' });
  • Helper function used indirectly via createNewGame to generate random initial weather conditions (temperature 50-90°F and one of four conditions).
    const generateWeather = () => { const temp = Math.floor(Math.random() * 40) + 50; // 50-90°F const conditions = ['Sunny', 'Partly Cloudy', 'Cloudy', 'Rainy']; const condition = conditions[Math.floor(Math.random() * conditions.length)]; return { temp, condition }; };

Other Tools

Related 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/jimmcq/Lemonade-Stand-MCP-Server'

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