Skip to main content
Glama
PsychoSmiley

MCP-to-MCP Tic-Tac-Toe

by PsychoSmiley

make_move

Place your mark on a tic-tac-toe board by specifying a position (A1 to C3) to play against another AI opponent in an automated game.

Instructions

Place your mark on the tic-tac-toe board. Positions: A1, A2, A3, B1, B2, B3, C1, C2, C3.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
moveYesBoard position (e.g. A1, B2, C3)

Implementation Reference

  • The implementation of the `make_move` tool handler, which manages the Tic-Tac-Toe game state, validates moves, and coordinates turn-taking.
    srv.registerTool("make_move", {
      description: "Place your mark on the tic-tac-toe board. Positions: A1, A2, A3, B1, B2, B3, C1, C2, C3.",
      inputSchema: { move: z.string().describe("Board position (e.g. A1, B2, C3)") },
    }, async ({ move }, extra) => {
      const sid = extra.sessionId;
      const heartbeat = () =>
        srv.sendLoggingMessage({ level: "info", data: `Waiting for opponent...\n${render(game?.board || [])}` }, sid).catch(() => {});
    
      if (!game) {
        game = createGame(sid);
        game.waiter = null;
        const r = place(game.board, move, "X");
        if (r.err) { game = null; return txt(r.err); }
        game.board = r.board;
        game.turn = "O";
        game.waiter = waitForOpponent(heartbeat);
        const oppMove = await game.waiter.promise;
        if (!oppMove) { game = null; return txt("Opponent didn't respond in time. Game abandoned."); }
        return endTurn(game, oppMove, "X");
      }
    
      const mark = assignPlayer(game, sid);
      if (!mark) return txt("Game in progress. Try again later.");
    
      if (game.turn !== mark)
        return txt(`Not your turn yet. Current board:\n${render(game.board)}\nYou are ${mark}. Call make_move after opponent plays.`);
    
      const r = place(game.board, move, mark);
      if (r.err) return txt(`${r.err}\nBoard:\n${render(game.board)}\nYou are ${mark}. Call make_move again.`);
      game.board = r.board;
      game.turn = mark === "X" ? "O" : "X";
    
      const w = winner(game.board);
      if (w) {
        if (game.waiter) game.waiter.resolve(move);
        markFinished();
        return txt(`Placed ${move.toUpperCase()} as ${mark}. Game over — ${formatWin(w)}\n${render(game.board)}`);
      }
    
      if (game.waiter) game.waiter.resolve(move);
      game.waiter = waitForOpponent(heartbeat);
      const oppMove = await game.waiter.promise;
      if (!oppMove) { game = null; return txt("Opponent didn't respond in time. Game abandoned."); }
      return endTurn(game, oppMove, mark);
    });
  • server.js:223-226 (registration)
    The registration of the `make_move` tool for the stdio proxy transport.
    stdioSrv.registerTool("make_move", {
      description: "Place your mark on the tic-tac-toe board. Positions: A1, A2, A3, B1, B2, B3, C1, C2, C3.",
      inputSchema: { move: z.string().describe("Board position (e.g. A1, B2, C3)") },
    }, async ({ move }) => proxyMove(proxyUrl, move));
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. It mentions the action ('Place your mark') but lacks details on behavioral traits like whether it validates moves, handles errors, updates game state, or requires specific conditions (e.g., valid turn). This leaves gaps in understanding how the tool behaves beyond the basic action.

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 very concise and front-loaded, with two sentences that directly state the action and provide necessary positional information. There is no wasted text, 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 complexity (a game move tool with no annotations and no output schema), the description is incomplete. It doesn't cover behavioral aspects like error handling, game rules, or return values, which are crucial for an AI agent to use it correctly in a tic-tac-toe context.

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 schema description coverage is 100%, so the schema already documents the 'move' parameter with examples. The description adds minimal value by listing the positions (A1-A3, B1-B3, C1-C3), which clarifies the format but doesn't go beyond what the schema implies. This meets the baseline for 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 action ('Place your mark') and the resource ('on the tic-tac-toe board'), making the purpose specific and understandable. It doesn't need to differentiate from siblings since there are none, but it could be slightly more precise about what 'your mark' means (e.g., X or O).

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, such as prerequisites (e.g., game state, turn order), alternatives (none exist here), or exclusions. It simply states what the tool does without context for its application.

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/PsychoSmiley/mcp-to-mcp'

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