Tools
Every tool the MCP server offers, and its arguments.
shaders_get
Returns a published version's graph and texture assets: the latest, or the one named by version. An unpublished shader is not served. draft=1 serves the current saved graph instead and requires a preview token. Responses carry an ETag and honour If-None-Match.
Works with any token, including preview tokens.
| Argument | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
version | string | no | |
draft | boolean | no | |
slim | boolean | no |
nodes_list
Search the built-in catalogue: registry nodes (kind node, one TSL function each, id like sin) and official presets (kind preset, whole effects, id like official:ripple). q matches id, label and description. With no filters, returns the category list instead of nodes. Each entry lists its inputs as name:type and its output type. Never guess ids or port names: find them here, then read details with nodes_get.
Works with any token, including preview tokens.
| Argument | Type | Required | Description |
|---|---|---|---|
q | string | no | |
category | string | no | |
kind | "node" | "preset" | no | |
limit | integer | no |
nodes_get
Full detail for a registry node id or an official:<id> preset. Registry nodes: every port with type and default, the TSL function and module implementing it, a help text and an example graph with its generated TSL code. Presets: versions, exposed inputs with defaults and named outputs (the instance's ports), help and a showcase example graph; internals: true adds the preset's own authored graph and generated TSL code. Example graphs are valid input to shaders_edit replace_graph.
Works with any token, including preview tokens.
| Argument | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
internals | boolean | "true" | "false" | no |
docs_search
Full-text search over the product documentation. Returns matching pages and headings with their slug; read one with docs_read.
Works with any token, including preview tokens.
| Argument | Type | Required | Description |
|---|---|---|---|
q | string | yes |
docs_read
One documentation page as markdown, by slug (e.g. concepts/shader-inputs, quickstart).
Works with any token, including preview tokens.
| Argument | Type | Required | Description |
|---|---|---|---|
slug | string | yes |
graph_validate
Checks a stored graph: node and preset ids exist, every edge's ports exist and types are compatible, zones are paired, names are legal and unique, and every output compiles. Returns diagnostics (errors block publishing; warnings do not), the exposed-input and named-output interface, and the primary output type. Free and stateless; shaders_create, shaders_edit and shaders_fork run it too.
Works with any token, including preview tokens.
| Argument | Type | Required | Description |
|---|---|---|---|
graph | object | yes | A shader graph as the editor stores it. Node types: flowNode (data.tslNodeId), inputNode (data.kind + value fields), textureNode (data.pathname, data.source), outputNode (id __output__, input color), namedOutputNode (data.outputName, input value), repeatStartNode/repeatEndNode and feedbackStartNode/feedbackEndNode (end data.startId), shaderNode (data.shaderId, data.version, data.official; or a local group: data.group true, data.name, data.graph). Registry port lists and official preset graphs may be omitted; they are restored from the catalogue. |
shaders_search
Public shaders, newest first, matching q on name or description, optionally one category or one organization org. Page with cursor from the previous nextCursor. Read one's graph with shaders_read, start from it with shaders_fork, or embed it as a node with the shaders_edit import_shader op.
Works with any token, including preview tokens.
| Argument | Type | Required | Description |
|---|---|---|---|
q | string | no | |
category | string | no | |
org | string | no | |
cursor | string | no |
shaders_read
A shader as authored: metadata, versions, the graph with its instances and positions, interface, a node summary (counts by type, presets used, shaders imported) and generated TSL code. Without draft, serves a published version (latest, or version) of a public shader to anyone, or of a private one to its organization. With draft: true, serves the current saved graph and its revision to a token of the owning organization; pass that revision to shaders_edit. slim: true drops node positions and the generated code, for large graphs.
Works with any token, including preview tokens.
| Argument | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
version | string | no | |
draft | boolean | no | |
slim | boolean | no |
shaders_list
Shaders in one of your organizations, most recently updated first, with their current revision, latest published version and folderId. q filters by name; folderId lists one folder (from folders_list), root the shaders in no folder.
Works with any token, including preview tokens.
| Argument | Type | Required | Description |
|---|---|---|---|
org | string | no | Organization slug (see me_get). Omitted: your personal organization. Org API keys always act in their own organization. |
q | string | no | |
folderId | string | no | |
includeArchived | boolean | no |
shaders_create
Creates a private draft. graph is optional; the default is a starter graph with a UV node feeding the output. Returns the id, revision 0, the editor URL and the graph's diagnostics. Build it up with shaders_edit.
Needs a personal token or an org API key.
| Argument | Type | Required | Description |
|---|---|---|---|
org | string | no | Organization slug (see me_get). Omitted: your personal organization. Org API keys always act in their own organization. |
name | string | no | |
graph | object | no | A shader graph as the editor stores it. Node types: flowNode (data.tslNodeId), inputNode (data.kind + value fields), textureNode (data.pathname, data.source), outputNode (id __output__, input color), namedOutputNode (data.outputName, input value), repeatStartNode/repeatEndNode and feedbackStartNode/feedbackEndNode (end data.startId), shaderNode (data.shaderId, data.version, data.official; or a local group: data.group true, data.name, data.graph). Registry port lists and official preset graphs may be omitted; they are restored from the catalogue. |
shaders_edit
Applies up to 200 ops in order to the draft graph; split a larger rebuild into several calls. All or nothing: if any op fails the graph is untouched and the error names the failing opIndex. expectedRevision must equal the current revision (from shaders_read with draft, or the last write); on mismatch nothing is written and the error carries the current revision. New nodes get ids like <base>_1 unless you pass id; the response lists created ids in order. Omitted positions are laid out automatically. Ops: add_node {tslNodeId, inputs?: {port: literal}}, add_input {kind, value, exposed?, inputName?}, add_texture {pathname | source: webcam}, add_preset {presetId, inputs?}, import_shader {shaderId, version?, inputs?}, add_named_output {outputName}, add_repeat {count?, slots?} (creates <id> and <id>_end; start takes initial, count and gives state, index; end takes next and gives output), add_feedback (creates <id> and <id>_end; start gives only state, last frame's value; end takes next and gives output), remove_node, connect {source, sourceHandle = output or a swizzle x/y/z/w/r/g/b, target, targetHandle}, disconnect, set_input, expose_input, rename_node (renames a group too), move_node, group_nodes {ids, name, inputNames?, outputNames?} (folds nodes into a group; its id is in created), ungroup {id}, tidy (lays out and sets previews; run it last), replace_graph. Connecting to an occupied input replaces its edge. The constant nodes an op's inputs created are removed with their node, or when their port is rewired. The response carries diagnostics, the new interface, and groups: every group with its input and output ports.
Needs a personal token or an org API key.
| Argument | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
expectedRevision | integer | yes | |
ops | object[] | yes |
Each entry of ops is one of:
| Op | Fields | Notes |
|---|---|---|
add_node | tslNodeId, inputs?, id?, position? | Add a registry node. inputs wires literal constants to named ports. |
add_input | kind, value?, exposed?, inputName?, id?, position? | Add a constant or exposed input. Color values are linear RGB: sRGB 0.5 grey is 0.214. |
add_texture | pathname?, source?, exposed?, inputName?, id?, position? | |
add_preset | presetId, version?, inputs?, id?, position? | Add an official preset. inputs wires literal constants to its exposed inputs. |
import_shader | shaderId, version?, inputs?, id?, position? | Instance a published shader. inputs wires literal constants to its exposed inputs. |
add_named_output | outputName, id?, position? | |
add_repeat | count?, slots?, id?, position? | |
add_feedback | id?, position? | |
remove_node | id | |
connect | source, sourceHandle?, target, targetHandle | |
disconnect | edgeId?, target?, targetHandle? | |
set_input | id, value | |
expose_input | id, inputName | |
rename_node | id, label | |
move_node | id, position | |
group_nodes | ids, name, id?, inputNames?, outputNames? | Fold existing nodes into one named group. Every wire crossing the group becomes a port: an input per outside source, an output per inner source. Name ports with inputNames (keyed by the outside source, node or node.handle) and outputNames (keyed by the inner source); unnamed ones are derived. Groups cannot nest. |
ungroup | id | Splice a group's nodes back into the graph in its place. |
tidy | Lay the graph out left to right into the output, split a uv or constant feeding 4+ nodes into copies, and choose which previews show; groups are tidied inside too. Changes layout and previews only, never what renders. Run it as the last edit. | |
replace_graph | graph |
shaders_update
Rename, describe (≤300 chars), categorize, change visibility, or file into a folder. visibility: public lists a published shader in the community and requires a published version. folderId is a folder of the shader's organization (folders_list, folders_create); null moves it back to the root.
Needs a personal token or an org API key.
| Argument | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
name | string | no | |
description | string | no | |
category | string | null | no | |
visibility | "private" | "public" | no | |
folderId | string | null | no |
shaders_fork
Copies a public shader's published version (latest, or version) into a new private draft you own, recording where it came from.
Needs a personal token or an org API key.
| Argument | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
version | string | no | |
org | string | no | Organization slug (see me_get). Omitted: your personal organization. Org API keys always act in their own organization. |
name | string | no |
shaders_publish
Freezes the current draft as a new semver version (first publish is 1.0.0). Refuses a graph with error diagnostics. Publishing does not make a shader public; use shaders_update visibility for that. Returns the version, the slug and the embed URL.
Needs a personal token or an org API key.
| Argument | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
bump | "major" | "minor" | "patch" | yes | |
changelog | string | no | |
slug | string | no |
folders_list
The folders of one of your organizations, by name. A shader sits in at most one folder; folders do not nest. File a shader with shaders_update folderId.
Works with any token, including preview tokens.
| Argument | Type | Required | Description |
|---|---|---|---|
org | string | no | Organization slug (see me_get). Omitted: your personal organization. Org API keys always act in their own organization. |
folders_create
Creates a folder in one of your organizations (color defaults to blue) and returns it. File shaders into it with shaders_update folderId.
Needs a personal token or an org API key.
| Argument | Type | Required | Description |
|---|---|---|---|
org | string | no | Organization slug (see me_get). Omitted: your personal organization. Org API keys always act in their own organization. |
name | string | yes | |
color | string | no | A palette color name such as blue, emerald or amber; an unknown one is refused with the full list. |
assets_list
Files uploaded to a shader, newest first. Use a pathname in the shaders_edit add_texture op. The local server's assets_upload tool adds one from a file on your machine.
Works with any token, including preview tokens.
| Argument | Type | Required | Description |
|---|---|---|---|
id | string | yes |
me_get
The caller: token kind, user (for personal tokens) and the organizations it can act in, by slug. Use a slug as org on other tools.
Works with any token, including preview tokens.
No arguments.
render
Render a shader to a PNG you can look at, with stats: mean colour, how much of
it is black, and whether any pixel is NaN. Pass shaderId or an unsaved
graph. times: [0, 0.5, 1, 2] shows motion in one image.
Only the local server returns images. The hosted server answers with a preview link for a published shader.
| Argument | Type | Required | Description |
|---|---|---|---|
shaderId | string | no | The shader to render. |
graph | object | no | An unsaved graph to render instead of a shader. |
version | string | no | A published version. Default: the latest. |
draft | boolean | no | Render your saved draft instead of a version. |
nodeId | string | no | Render one node's output, to inspect a branch. |
output | string | no | Render a named output. |
inputs | Record<string, number | boolean | string | number[]> | no | Values for exposed inputs, by name. |
times | number[] | no | Seconds, 1 to 8 of them. Default [1]. Several come back as one strip. |
size | 256 | 512 | no | Frame size in pixels. Default 256. |
warmupFrames | integer | no | Frames to run first, for feedback graphs. Default 45. |
assets_upload
Upload an image or video from your computer to a shader, up to 4 MB. Returns
its pathname, which the add_texture op takes. Only the local server
offers it.
| Argument | Type | Required | Description |
|---|---|---|---|
shaderId | string | yes | A shader you can edit. |
path | string | yes | The file's path on the machine running the server. |