mcp
v0.3.22FlatInk MCP server: exposes the asset library + the forge's compile/preview/publish as tools for LLM agents.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
describe_scene
What does this program DO? Parses a `.flatink` source LOCALLY (no forge round-trip) and returns its manifest: the named objects with the contract each carries (events handled, channels driven, variables read), the state variables, the functions, and the `send` events it emits — including the ones emitted from inside a procedure or an `if` body, which reading the text for `send` would miss. Use it to check what you just wrote, or to decide whether a fragment is allowed to do what it does.
| Parameter | Type | Description |
|---|---|---|
source * | string | .flatink DSL source |
search_assets
Search the FlatInk library for turnkey assets (clipart) by natural-language query. Returns, per asset: `name`, dimensions, tags, and a ready-to-paste RECIPE -- `use.dsl` (the `image "<name>" <w> <h> at <x>,<y>` line) and `use.publish.library` (the name to pass in `library:[...]` when previewing/publishing).
| Parameter | Type | Description |
|---|---|---|
query * | string | natural-language query, e.g. "musical instrument", "renewable energy" |
category | string | category filter (animals, objects, nature, buildings, ...) |
limit | integer | |
style | string | graphic-style / collection filter, e.g. "engraving" (antique monochrome) or "paper-theater" (flat color clipart) |
view | string | orientation filter (front, side, three-quarter, top, back, flat) |
get_asset
Look up a library asset by its exact `name` (dimensions, tags, description, recipe).
| Parameter | Type | Description |
|---|---|---|
name * | string |
check_scene
Validate a `.flatink` DSL source (compile without rendering) -> { ok, errors, warnings }.
| Parameter | Type | Description |
|---|---|---|
source * | string | .flatink DSL source |
library | array | names of library assets referenced by `image "<name>"` in the source |
preview_scene
Compile + RENDER a DSL source to PNG and return the image (to iterate visually). `library` assets are inlined server-side.
| Parameter | Type | Description |
|---|---|---|
source * | string | |
frame | integer | timeline frame to render (default 0) |
library | array | |
scale | number |
preview_symbol
Render N frames of ONE symbol from a `.flat` library and return the images -- to ITERATE on a symbol asset WITHOUT storing anything. `engine:"player"` animates reactive modifiers (spring/velocity) and sub-loops; `"flatc"` (default) freezes those modifiers but honors `scale`. Set states / params / colors via `set` (e.g. { "state": "spin", "body": "#E94F4F" }).
| Parameter | Type | Description |
|---|---|---|
frames * | array | frame numbers to render (<= 24) |
lib * | string | contents of the .flat file (symbol library) |
engine | string | "player" to animate spring/velocity; "flatc" by default |
scale | number | resolution factor (engine "flatc" only) |
set | object | states / params / recolor to apply |
symbol | string | symbol name (default: the first in the lib) |
publish_scene
Publish a scene (compile + store) and return its public URL (/p/:id). `library` assets are inlined.
| Parameter | Type | Description |
|---|---|---|
source * | string | |
library | array | |
title | string |