API & MCP
Everything a person can do on Autotile Generator (blob 47 and Wang 16 rules), a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://fliplineautotilegenerator.usefulweb.site/api/v1/calculate– run Autotile Generator (blob 47 and Wang 16 rules)GET https://fliplineautotilegenerator.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Autotile Generator (blob 47 and Wang 16 rules)
Draw terrain as # and . rows and choose the 47-tile blob set or the 16-tile Wang edge or corner set. The rule engine picks each tile variant from its neighbours and returns tile indices, a Tiled TMX map, a rendered PNG and merged collision rectangles.
| Field | Type | Default | Description |
|---|---|---|---|
terrain | textarea | "....................\n..######......###...\n.########....#####..\n.###..###.... | Terrain rows (# = terrain, . = empty) |
mode | select (blob47, edge16, corner16) | "blob47" | Rule set |
tileSize | integer | 16 | Tile size (px) |
outside | select (empty, terrain) | "empty" | Cells beyond the grid |
orientation | select (orthogonal, isometric) | "orthogonal" | Map orientation |
encoding | select (csv, base64, base64-zlib, base64-gzip) | "csv" | TMX layer encoding |
tileset | file | — | Own tileset PNG (optional; tiles in slot order unless mapped) |
mapping | text | — | Slot → tile mapping (optional; 47 or 16 numbers, −1 = missing) |
Example request
Two islands with a lake (blob 47)
curl -X POST https://fliplineautotilegenerator.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"terrain":"....................\n..######......###...\n.########....#####..\n.###..###....##.##..\n.########.....###...\n..######............\n....##.....#######..\n....##.....#######..\n..........##.....#..\n.#####.....#######..\n.#####..............\n....................","mode":"blob47","tileSize":16,"outside":"empty","orientation":"orthogonal","encoding":"csv","mapping":""}'
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://fliplineautotilegenerator.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
flipline_autotile_generator - Local stdio connector:
node src/mcp-stdio.ts --tool=flipline-autotile-generator
{
"mcpServers": {
"flipline-autotile-generator": { "type": "http", "url": "https://fliplineautotilegenerator.usefulweb.site/mcp" }
}
}