Skip to main content
Glama
jimmcq

Lemonade Stand MCP Server

by jimmcq

next_day

Advance to the next day in the Lemonade Stand business simulation game to manage weather changes, adjust pricing strategies, and control inventory.

Instructions

Advance to the next day

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gameIdYesThe game ID

Implementation Reference

  • Core handler function implementing the 'next_day' tool logic: advances the game day, generates new weather, resets ice inventory to 0 (melts daily), updates status to 'buying', or ends game after day 14.
    const handleNextDay = (gameState) => {
      if (gameState.day >= 14) {
        return {
          success: true,
          gameState: {
            ...gameState,
            status: 'gameOver'
          }
        };
      }
    
      return {
        success: true,
        gameState: {
          ...gameState,
          day: gameState.day + 1,
          weather: generateWeather(),
          status: 'buying',
          inventory: {
            ...gameState.inventory,
            ice: 0 // ice melts daily
          }
        }
      };
    };
  • server.js:283-293 (registration)
    Tool registration in ListTools response, defining name, description, and input schema requiring gameId.
    {
      name: "next_day",
      description: "Advance to the next day",
      inputSchema: {
        type: "object",
        properties: {
          gameId: { type: "string", description: "The game ID" }
        },
        required: ["gameId"]
      }
    }
  • Dispatch handler in CallToolRequestHandler switch statement: retrieves game state, calls handleNextDay, persists updated state, returns result as JSON.
    case 'next_day': {
      const nextDayGame = games.get(request.params.arguments?.gameId);
      if (!nextDayGame) {
        throw new McpError(ErrorCode.InvalidRequest, "Game not found");
      }
      
      const nextDayResult = handleNextDay(nextDayGame);
      if (nextDayResult.success) {
        games.set(request.params.arguments.gameId, nextDayResult.gameState);
      }
      
      return {
        content: [{
          type: "text",
          text: JSON.stringify(nextDayResult)
        }]
      };
    }
  • Input schema definition for 'next_day' tool, specifying required 'gameId' string parameter.
    inputSchema: {
      type: "object",
      properties: {
        gameId: { type: "string", description: "The game ID" }
      },
      required: ["gameId"]
    }
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. 'Advance to the next day' implies a mutation (changing state), but it doesn't specify if this is reversible, has side effects (e.g., updates game state), requires permissions, or what happens upon execution. For a mutation tool with zero annotation coverage, 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.

Conciseness5/5

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

The description is extremely concise with 'Advance to the next day'—a single, clear sentence that front-loads the core action. There is no wasted verbiage or redundancy, making it efficient and easy to parse.

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 tool likely mutates game state (inferred from siblings like 'start_game'), there are no annotations or output schema to clarify behavior. The description is too minimal—it doesn't explain what 'advance' entails (e.g., updates time, triggers events) or the return value. For a mutation tool in a game context, this leaves critical gaps in understanding.

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

Parameters4/5

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

The input schema has 1 parameter with 100% coverage (gameId is described as 'The game ID'), so the schema does the heavy lifting. The description doesn't add any parameter details beyond what the schema provides, but with only one parameter and high schema coverage, the baseline is high. It implies the tool operates on a game context, which aligns with the parameter.

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

Purpose3/5

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

The description 'Advance to the next day' states a clear action (advance) and target (next day), but it's vague about what exactly gets advanced. It doesn't specify if this is for a game, simulation, or calendar, nor does it differentiate from siblings like 'start_game' or 'set_price'. The purpose is understandable but lacks specificity.

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., requires an active game), exclusions, or relationships with sibling tools like 'buy_supplies' or 'sell_lemonade'. Usage is implied only by the action itself, with no contextual instructions.

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

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