shader.write
Since next
[editor or disk] Check a *.shader.wgsl, then save it: errors come back as {code, line, col, message, hint}, nothing written.
Answers {hash, cost, variants, params}.
| Title | Write a shader |
| Mode | |
| Token cost | about 148 tokens (listed only when its toolset is enabled) |
| Toolset | shaders |
Arguments
| Argument | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
dryRun | boolean | no | Check only | ||
material | object | no | {path, params}: also write a .material.json | ||
path | string | yes | A *.shader.wgsl file, such as shaders/glow.shader.wgsl. | ||
source | string | yes | //! header lines, then WGSL with fn surface() |
Example
An MCP tools/call with the required arguments (placeholders in angle brackets).
{
"name": "shader.write",
"arguments": {
"path": "<path>",
"source": "<source>"
}
}