mcp

v0.3.22
@flatkit/mcp Checked 4 days ago Published 1 month ago

FlatInk 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.

ParameterTypeDescription
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).

ParameterTypeDescription
query *stringnatural-language query, e.g. "musical instrument", "renewable energy"
categorystringcategory filter (animals, objects, nature, buildings, ...)
limitinteger
stylestringgraphic-style / collection filter, e.g. "engraving" (antique monochrome) or "paper-theater" (flat color clipart)
viewstringorientation filter (front, side, three-quarter, top, back, flat)

get_asset

Look up a library asset by its exact `name` (dimensions, tags, description, recipe).

ParameterTypeDescription
name *string

check_scene

Validate a `.flatink` DSL source (compile without rendering) -> { ok, errors, warnings }.

ParameterTypeDescription
source *string.flatink DSL source
libraryarraynames 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.

ParameterTypeDescription
source *string
frameintegertimeline frame to render (default 0)
libraryarray
scalenumber

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" }).

ParameterTypeDescription
frames *arrayframe numbers to render (<= 24)
lib *stringcontents of the .flat file (symbol library)
enginestring"player" to animate spring/velocity; "flatc" by default
scalenumberresolution factor (engine "flatc" only)
setobjectstates / params / recolor to apply
symbolstringsymbol 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.

ParameterTypeDescription
source *string
libraryarray
titlestring