# Build a play with the Coach Board MCP

Back to the index: https://www.coachboard.app/mcp.md · All tools: https://www.coachboard.app/mcp/tools.md

## The workflow

1. **`new_board`.** Choose the sport (`big-football` or `basketball`) and a title.
2. **Build the play with the board tools:**
   - `set_board_config`: half pitch, plain board, rule-set (FIBA, NBA…), direction.
   - `place_formation`: a team, or both, in a formation (e.g. 4-3-3 against 4-4-2).
   - `layout_drill` for standard drills (rondo, possession, small-sided game, attack on a goal). Use `setup_drill` for anything else.
   - `annotate_board`: arrows (pass, run, dribble…), zones, labels, notes beside the board.
   - `animate_board`: the movement, as frames — who runs where, who gets the ball.
     - The players must already be on the board, with a ball for passes.
     - A movement is animated by default; static arrows only when you ask for a drawing.
     - `replace: true` rebuilds an animation from Frame 1.
   - `describe_board`: read the board. `detail: true` gives every position, so ask for it before moving or animating players.
3. **`export_play`.** The play is checked (see below). If it passes, you get:
   - the **play data** (JSON, exactly the format the Coach Board app saves)
   - an **embed snippet** for any web page. See https://www.coachboard.app/mcp/embed.md
4. **Keep both:**
   - Paste the snippet into the article.
   - Save the JSON (e.g. `plays/<slug>.json`) so the play can be changed later.

**To change a play later:** `load_play` with the saved JSON, change it with the tools, then `export_play` again. **Never edit the JSON or the link by hand.**

## The checks (before anything is returned)

`export_play` returns the play only if:

- everything is inside its board
- no two players overlap
- no ball or equipment is hidden under a player
- text is large enough to read
- lines are thick enough to see
- in an animation, the ball always reaches a player and nothing leaves the board

If something fails, you get **no data, only the problems**, for example "two players overlap" or "the ball goes to nobody in frame 3". Fix them with the tools and export again.

## Coordinates

- **Units:** positions are in field units, in the board's own space. Football: 100 units = 1 m; a full pitch is 10500 × 6800.
- **Direction:** on a full pitch, home attacks left to right.
- **Half boards:** a half board is its own smaller space.
- **When unsure,** use `describe_board` with `detail: true`: it lists every item, named spots (penalty spot, free-throw line…) and which end each team attacks.

## Example requests

- "Build a 4-3-3 showing a wing overload: the right-back overlaps, the winger cuts inside, the striker attacks the near post. Animate it and export it."
- "A 4v2 rondo in a 20 × 20 m grid for U12s, export it."
- "Basketball half court: draw a pick and roll for the 1 and the 5, then export."
- "Load this play and make the striker's run curve to the left: <JSON>"

Next: put it in an article: https://www.coachboard.app/mcp/embed.md
