API & MCP
Everything a person can do on Falling Blocks Placement Solver, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://pixelpierblockfallsolver.usefulweb.site/api/v1/calculate– run Falling Blocks Placement SolverGET https://pixelpierblockfallsolver.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Falling Blocks Placement Solver
Paste a falling-blocks board as rows of “.” and “#”, pick the current piece (I, O, T, S, Z, J or L) and optionally the next one. The solver tries every rotation and column the piece can be dropped into, scores each resulting board by height, holes, transitions and wells, and returns the best placement with the board after it, cleared rows and the runner-up placements. It is the same function that powers the hint and the demo player in Pixelpier’s Blockfall.
| Field | Type | Default | Description |
|---|---|---|---|
board | textarea | "...........\n...........\n...........\n...........\n...........\n...........\n. | Board (top row first; “.” = empty, “#” = filled). Width 4–20 cells, height 4–40 rows. Pixelpier’s Blockfall deck is 11 × 21. Any character other than “.” or a space counts as filled. |
piece | select (I, O, T, S, Z, J, L) | "I" | Current piece |
next | select (, I, O, T, S, Z, J, L) | — | Next piece (optional lookahead) |
alternatives | integer | 5 | Runner-up placements to list |
Example request
Long piece into a deep well
curl -X POST https://pixelpierblockfallsolver.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"board":"...........\n...........\n...........\n...........\n...........\n...........\n...........\n...........\n...........\n...........\n...........\n...........\n...........\n...........\n...........\n...........\n.........##\n####.######\n####.######\n####.######\n####.######","piece":"I","next":"","alternatives":5}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://pixelpierblockfallsolver.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
pixelpier_blockfall_solver - Local stdio connector:
node src/mcp-stdio.ts --tool=pixelpier-blockfall-solver
{
"mcpServers": {
"pixelpier-blockfall-solver": { "type": "http", "url": "https://pixelpierblockfallsolver.usefulweb.site/mcp" }
}
}