{"at":"2026-11-23T04:08:06.721Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T04:08:07.491Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T04:08:07.642Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T04:08:08.356Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"prompts":{"listChanged":true},"tools":{"listChanged":true}},"protocolVersion":"2025-11-25","serverInfo":{"name":"rive-mcp","version":"0.12.0"}}}}
{"at":"2026-11-23T04:08:08.356Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T04:08:08.356Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T04:08:08.395Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"Recursively find .riv files under a directory and report size and format version for each.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"dir":{"description":"Directory to search (absolute or relative)","type":"string"}},"required":["dir"],"type":"object"},"name":"riv_list","title":"List .riv files"},{"description":"Extract full metadata from a .riv file: artboards, animations (duration/fps/loop), state machines and their inputs (name/type/initial value). Uses the official Rive runtime. Also decodes Data Binding (ViewModel) structure when present — ViewModel definitions and their properties, ViewModelInstances with resolved property values (including enum/nested-viewmodel/list references), enums, converters, and DataBind wiring (which target object/property each bind writes to) — via direct binary parsing (returned as `dataBinding`, omitted when the file has none).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"path":{"description":"Path to the .riv file","type":"string"}},"required":["path"],"type":"object"},"name":"riv_inspect","title":"Inspect a .riv file"},{"description":"Render one frame of a .riv animation or state machine to PNG. Returns the image inline and saves it to disk.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"animation":{"description":"Linear animation name","type":"string"},"artboard":{"description":"Artboard name (default: first)","type":"string"},"background":{"description":"CSS background color (default: transparent)","type":"string"},"height":{"description":"Output height in px (default: keeps the artboard aspect ratio)","exclusiveMinimum":0,"maximum":4096,"type":"integer"},"outPath":{"description":"Output PNG path (default: alongside the .riv)","type":"string"},"path":{"description":"Path to the .riv file","type":"string"},"stateMachine":{"description":"State machine name (takes precedence)","type":"string"},"time":{"description":"Seconds to advance before capturing (default 0)","type":"number"},"width":{"description":"Output width in px (default: artboard width)","exclusiveMinimum":0,"maximum":4096,"type":"integer"}},"required":["path"],"type":"object"},"name":"riv_render_frame","title":"Render a single frame to PNG"},{"description":"Render a .riv animation (or state machine idle playback) to an animated GIF file for preview.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"animation":{"description":"Animation name (default: first state machine or animation)","type":"string"},"artboard":{"description":"Artboard name (default: first artboard)","type":"string"},"background":{"description":"CSS background color (default white — GIF has no alpha)","type":"string"},"duration":{"description":"Seconds to render (default 2)","exclusiveMinimum":0,"maximum":30,"type":"number"},"fps":{"description":"Frames per second (default 20)","exclusiveMinimum":0,"maximum":60,"type":"integer"},"outPath":{"description":"Output GIF path (default: alongside the .riv)","type":"string"},"path":{"description":"Path to the .riv file","type":"string"},"stateMachine":{"description":"State machine name (takes precedence over animation)","type":"string"},"width":{"description":"Output width in px (default 480)","exclusiveMinimum":0,"maximum":2048,"type":"integer"}},"required":["path"],"type":"object"},"name":"riv_render_gif","title":"Render an animation to GIF"},{"description":"Render a .riv animation (or state machine playback) to an animated PNG (APNG). Unlike GIF this supports 24-bit color plus full alpha transparency, and GitHub READMEs animate it like a regular image. Frames are rendered with a transparent background by default.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"animation":{"description":"Animation name (default: first state machine or animation)","type":"string"},"artboard":{"description":"Artboard name (default: first artboard)","type":"string"},"background":{"description":"CSS background color when transparent=false (default #ffffff)","type":"string"},"duration":{"description":"Seconds to render (default 2)","exclusiveMinimum":0,"maximum":30,"type":"number"},"fps":{"description":"Frames per second (default 20)","exclusiveMinimum":0,"maximum":60,"type":"integer"},"height":{"description":"Output height in px (default: keeps the artboard aspect ratio)","exclusiveMinimum":0,"maximum":2048,"type":"integer"},"loops":{"description":"Loop count (0 = infinite, default 0)","minimum":0,"type":"integer"},"out":{"description":"Output path, .apng or .png (default: <name>.apng alongside the .riv)","type":"string"},"path":{"description":"Path to the .riv file","type":"string"},"stateMachine":{"description":"State machine name (takes precedence over animation)","type":"string"},"transparent":{"description":"Render on a transparent background to keep APNG alpha (default true). Set false to composite onto 'background'","type":"boolean"},"width":{"description":"Output width (default 480)","exclusiveMinimum":0,"maximum":2048,"type":"integer"}},"required":["path"],"type":"object"},"name":"riv_render_apng","title":"Render an animation to APNG"},{"description":"Run a .riv state machine step by step: set/fire inputs, advance time, observe state transitions, and optionally capture frames. Returns a transition report.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"artboard":{"description":"Artboard name (default: first artboard)","type":"string"},"background":{"description":"CSS background color (default: transparent)","type":"string"},"path":{"description":"Path to the .riv file","type":"string"},"stateMachine":{"description":"State machine name (default: first)","type":"string"},"steps":{"description":"Sequence of interaction steps","items":{"additionalProperties":false,"properties":{"advance":{"description":"Seconds to advance (default 0)","maximum":30,"minimum":0,"type":"number"},"capture":{"description":"Capture a PNG frame after this step","type":"boolean"},"input":{"description":"Input name to set/fire before advancing","type":"string"},"value":{"description":"Value for number/boolean inputs","type":["number","boolean"]}},"type":"object"},"maxItems":50,"type":"array"},"width":{"description":"Output width in px (default 480)","exclusiveMinimum":0,"maximum":2048,"type":"integer"}},"required":["path","steps"],"type":"object"},"name":"riv_play_state_machine","title":"Interactively drive a state machine"},{"description":"Generate ready-to-use integration code (React/Vue/Svelte/plain JS/Flutter) for a .riv file, using its real artboard, state machine and input names.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"framework":{"description":"Target: react, js (plain JavaScript), vue, svelte or flutter","enum":["react","js","vue","svelte","flutter"],"type":"string"},"path":{"description":"Path to the .riv file","type":"string"}},"required":["path","framework"],"type":"object"},"name":"riv_generate_code","title":"Generate integration code"},{"description":"Low-level dump of a .riv file's object stream (typeKeys, property values, hierarchy). Useful for debugging and format research. Large files return a summary unless full=true.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"full":{"description":"Return every object (default: summary + first 50)","type":"boolean"},"path":{"description":"Path to the .riv file","type":"string"}},"required":["path"],"type":"object"},"name":"riv_dump","title":"Dump .riv binary structure"},{"description":"Detect .riv features and compare optional target runtime versions with documented minimums. Report unsupported, conditional, or unverified support, and inspect the file with bundled official WASM.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"path":{"description":"Path to the .riv file","type":"string"},"strict":{"description":"Count unverified compatibility as a warning (default false)","type":"boolean"},"targets":{"description":"Target runtimes (default: all supported target names)","items":{"type":"string"},"type":"array"},"versions":{"additionalProperties":{"type":"string"},"description":"Target runtime versions as numeric dotted strings","type":"object"}},"required":["path"],"type":"object"},"name":"riv_preflight","title":"Check .riv runtime compatibility"},{"description":"Static diagnostic pass over a .riv file: broken/out-of-range references, oversized embedded assets, state-machine states unreachable by any transition, unconditional self-transitions (infinite-loop risk), unused state-machine inputs, keyframe easing silently discarded on a track's last keyframe, plus motion-quality rules (all-linear robotic movement, teleporting objects, missing stagger on simultaneous fade-ins, one-sided scale animation). Complements riv_dump (which shows raw structure but doesn't judge it).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"path":{"description":"Path to the .riv file","type":"string"}},"required":["path"],"type":"object"},"name":"riv_lint","title":"Diagnose a .riv file for structural problems"},{"description":"Repair lint findings one change at a time. Compare pixels for each candidate, skip visual changes with reasons, and validate the final result before writing. dryRun never writes.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"dryRun":{"description":"Inspect and validate without writing (default false)","type":"boolean"},"fixes":{"description":"Selected fix types (default all supported types)","items":{"enum":["unused-input","dead-easing","broken-reference","unused-interpolator"],"type":"string"},"type":"array"},"out":{"description":"Output path (default: <name>.repaired.riv next to the source; the source is never overwritten)","type":"string"},"path":{"description":"Source .riv path","type":"string"}},"required":["path"],"type":"object"},"name":"riv_repair","title":"Repair safe .riv lint findings"},{"description":"Deterministically generate professional design tokens for a scene BEFORE calling riv_create: an OKLCH-harmonized palette (with WCAG contrast ratios), gradient pairs, Material-Motion-derived durations & easing roles, spacing/radius/stroke scales and a type scale. Call this first, then use ONLY the returned values in the scene spec — never invent raw hex colors or ad-hoc durations. Inputs: optional seed color, mood (calm|playful|elegant|tech|warm|natural), scheme (dark|light).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"mood":{"description":"Sets the default hue when seed is absent (default calm)","enum":["calm","playful","elegant","tech","warm","natural"],"type":"string"},"scheme":{"description":"Default dark","enum":["dark","light"],"type":"string"},"seed":{"description":"Brand/seed color #RRGGBB (optional; mood default hue otherwise)","pattern":"^#[0-9a-fA-F]{6}$","type":"string"}},"type":"object"},"name":"riv_design_tokens","title":"Generate a design-token set (palette / motion / layout)"},{"description":"One-call review bundle for the render→critique→revise loop. Returns (1) a FILMSTRIP image — N frames left→right across the duration, so motion is readable as a sequence, (2) an ONION-SKIN image — all frames ghost-overlaid so every mover leaves a visible trail (use it to check trajectories and travel direction vs the artwork's facing), (3) a MOTION REPORT — net displacement/rotation vector per animated object computed from the file data, (4) objective design metrics + lint findings, and (5) a fixed 7-axis scoring checklist (incl. spatial/directional coherence). LOOK at the images, score each axis 1-5, fix anything below 4 (riv_edit / regenerate), then re-run. Iterate at least twice before delivering any non-trivial scene.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"animation":{"description":"Animation to sample (default: first)","type":"string"},"artboard":{"description":"Artboard name (default: first artboard)","type":"string"},"frames":{"description":"Frames to sample across the duration (default 6)","maximum":10,"minimum":2,"type":"integer"},"individualFrames":{"description":"Also return each sampled frame as a separate full-size image (default false)","type":"boolean"},"path":{"description":"Path to the .riv file","type":"string"},"stateMachine":{"description":"State machine name (takes precedence over animation)","type":"string"},"width":{"description":"Width of each filmstrip cell (default 200 — keep small, it saves tokens)","maximum":480,"minimum":120,"type":"integer"}},"required":["path"],"type":"object"},"name":"riv_critique","title":"Critique a .riv: filmstrip + onion skin + motion vectors + metrics + checklist"},{"description":"Convert an SVG file (Figma/Illustrator export, icon, illustration) into Rive bezier path shapes — the professional way to get high-quality artwork instead of drawing with primitives. Writes a scene-fragment JSON (shapes with full cubic vertices, gradients, strokes) and returns a rendered preview. Use the fragment in riv_create via \"imports\". Supports path/rect/circle/ellipse/polygon/polyline/line, nested transforms, style attrs, linear/radial gradients. Not imported: <text> (use texts[] with a font), <image>, filters, masks.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"idPrefix":{"description":"Prefix for generated shape ids (avoid collisions)","type":"string"},"outSpec":{"description":"Output scene-fragment JSON path (e.g. logo.scene.json)","type":"string"},"svg":{"description":"Inline SVG markup (alternative to svgPath)","type":"string"},"svgPath":{"description":"Path to the .svg file","type":"string"}},"required":["outSpec"],"type":"object"},"name":"riv_import_svg","title":"Import an SVG as Rive vector shapes"},{"description":"Search Iconify's ~200k professionally designed open-source icons and convert one directly into Rive shapes. Two modes: query-only returns matching icon names; icon+outSpec downloads the SVG and imports it (same output as riv_import_svg). Requires network access to api.iconify.design.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"icon":{"description":"Icon to fetch, e.g. 'solar:rocket-bold' (from a previous search)","type":"string"},"idPrefix":{"description":"Prefix for generated shape ids; applies when fetching an icon (default: the icon name with non-alphanumerics replaced, plus an underscore)","type":"string"},"limit":{"description":"Max results (default 24)","maximum":64,"minimum":1,"type":"integer"},"outSpec":{"description":"Required with icon: output scene-fragment JSON path","type":"string"},"query":{"description":"Search terms, e.g. 'rocket launch'","type":"string"}},"type":"object"},"name":"riv_asset_search","title":"Search/fetch professional vector icons (Iconify)"},{"description":"Convert a Lottie (bodymovin, .json) animation — the format of LottieFiles' free animation library — into a riv_create scene fragment. Unlike riv_import_svg (shapes only), this keeps the keyframed timing: position, rotation, scale and opacity with their exact bezier easing (not mapped to a named preset), shape/null/precomp layer hierarchy, solid layers, gradient fills, stroke trim-path animation, and layer in/out visibility windows. Writes a scene-fragment JSON with {groups,shapes,animations} plus a rendered preview and a coverage/warnings summary. Since the fragment includes animations (which riv_create's \"imports\" mechanism does not merge), splice its groups/shapes/animations arrays directly into your riv_create scene spec instead of using \"imports\". Supported: shape layers (path/ellipse/rect/star/polygon/fill/stroke/gradient/trim/nested groups), null layers, solid layers, one level of precomp inlining, parented layers, hold and bezier easing. Not imported (counted in coverage.skipped, not silently dropped): text layers, masks, track mattes, repeaters, merge-paths, path/gradient-position keyframe morphing (frozen to first frame + warning), time-remapped precomps, expressions.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"idPrefix":{"description":"Prefix for generated group/shape ids (avoid collisions)","type":"string"},"json":{"description":"Inline Lottie JSON text (alternative to path)","type":"string"},"outSpec":{"description":"Output scene-fragment JSON path (e.g. anim.scene.json)","type":"string"},"path":{"description":"Path to the Lottie .json file","type":"string"}},"required":["outSpec"],"type":"object"},"name":"riv_lottie_import","title":"Import a Lottie/bodymovin JSON as a Rive scene fragment (art + timing + easing)"},{"description":"Export one .riv animation to Lottie JSON. Reports unsupported and approximated features, and indicates whether pixel comparison was available.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"animation":{"description":"Animation name (default: first; all unsupported)","type":"string"},"artboard":{"description":"Artboard name (default: first)","type":"string"},"fps":{"description":"Output FPS (default: animation FPS)","exclusiveMinimum":0,"type":"number"},"out":{"description":"Output JSON path (default: adjacent .lottie.json)","type":"string"},"path":{"description":"Path to a .riv file","type":"string"}},"required":["path"],"type":"object"},"name":"riv_export_lottie","title":"Export a .riv animation to Lottie JSON"},{"description":"Reverse a .riv file into a riv_create scene spec (shapes with bezier vertices, solid/gradient fills incl. gradient opacity, blend modes, artboard background, groups/solos, trim paths, clipping, animations with named easings, loop modes). Paint objects are resolved by parentId, so editor-authored files (paints deferred to the stream tail) decompile correctly. Use it to study professional files as few-shot examples, or to remix them — art AND hand-tuned animation tracks — into new scenes (decompile → edit spec → riv_create; see samples/night-delivery). Object types outside the writer's coverage are counted in 'skipped', not silently dropped. Note: community/marketplace files are CC BY 4.0 — keep attribution.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"outSpec":{"description":"Write the scene spec JSON here (default: return summary only)","type":"string"},"path":{"description":"Path to the .riv file","type":"string"}},"required":["path"],"type":"object"},"name":"riv_decompile","title":"Decompile a .riv into an editable scene spec"},{"description":"Create a working .riv animation file from scratch (no Rive editor needed) and validate it with the official runtime. Returns a rendered preview frame.\nFor polished results (gradients, organic bezier curves, easing, springy motion), read the \"rive-design-guidelines\" prompt this server exposes before designing a non-trivial scene.\nScene spec example:\n{\n  \"artboard\": {\"name\":\"Demo\",\"width\":400,\"height\":300},\n  \"backgroundColor\": \"#1a1a2e\",\n  \"shapes\": [\n    {\"id\":\"box\",\"type\":\"rect\",\"x\":120,\"y\":150,\"width\":80,\"height\":80,\"cornerRadius\":12,\"rotation\":0,\"opacity\":1,\n     \"fill\":{\"color\":\"#e94560\"},\"stroke\":{\"color\":\"#fff\",\"thickness\":3}},\n    {\"id\":\"ball\",\"type\":\"ellipse\",\"x\":280,\"y\":150,\"width\":70,\"height\":70,\n     \"fill\":{\"gradient\":{\"type\":\"linear\",\"stops\":[{\"color\":\"#00d9ff\"},{\"color\":\"#0066ff\"}]}}},\n    {\"id\":\"tri\",\"type\":\"polygon\",\"x\":200,\"y\":100,\"points\":[{\"x\":0,\"y\":-40},{\"x\":35,\"y\":20},{\"x\":-35,\"y\":20}],\"fill\":{\"color\":\"#ffd700\"}}\n  ],\n  \"animations\": [\n    {\"name\":\"spin\",\"fps\":60,\"duration\":60,\"loop\":\"loop\",\"tracks\":[\n      {\"target\":\"box\",\"property\":\"rotation\",\"keyframes\":[{\"frame\":0,\"value\":0},{\"frame\":60,\"value\":360,\"easing\":\"linear\"}]},\n      {\"target\":\"ball\",\"property\":\"y\",\"keyframes\":[{\"frame\":0,\"value\":150},{\"frame\":30,\"value\":80,\"easing\":\"ease-out\"},{\"frame\":60,\"value\":150,\"easing\":\"ease-in\"}]}\n    ]}\n  ],\n  \"stateMachine\": {\"name\":\"SM\",\"inputs\":[{\"name\":\"go\",\"type\":\"bool\"}],\n    \"states\":[{\"name\":\"spinning\",\"animation\":\"spin\"}],\n    \"transitions\":[{\"from\":\"entry\",\"to\":\"spinning\",\"condition\":{\"input\":\"go\"}}]}\n}\nCharacter animation (images/groups/mesh):\n{\n  \"groups\": [{\"id\":\"rig\",\"x\":300,\"y\":200}],\n  \"images\": [{\"id\":\"chara\",\"pngPath\":\"./cat.png\",\"x\":0,\"y\":0,\"scale\":0.25,\"parent\":\"rig\",\n    \"mesh\":{\"columns\":6,\"rows\":6}}],\n  \"animations\": [{\"name\":\"idle\",\"duration\":240,\"loop\":\"loop\",\"tracks\":[\n    {\"target\":\"rig\",\"property\":\"y\",\"keyframes\":[{\"frame\":0,\"value\":200},{\"frame\":120,\"value\":195,\"easing\":\"ease-in-out\"},{\"frame\":240,\"value\":200,\"easing\":\"ease-in-out\"}]},\n    {\"target\":\"chara#v0_3\",\"property\":\"x\",\"keyframes\":[{\"frame\":0,\"value\":0},{\"frame\":120,\"value\":40,\"easing\":\"ease-in-out\"},{\"frame\":240,\"value\":0,\"easing\":\"ease-in-out\"}]}\n  ]}]\n}\n- layouts[]: Flex nodes {id,parent?,width?,height?,widthMode?,heightMode?,widthWeight?,heightWeight?,direction?,justifyContent?,alignItems?,gap?,padding?,margin?,wrap?,fillColor?}. Modes: fixed (default), percent (width/height is 0-100 percentage), auto (hug contents), fill (remaining space; optional positive weight per axis). gap: number or {horizontal?,vertical?}; padding/margin: number or {left?,right?,top?,bottom?}. Parent must be an earlier layout id. Shapes themselves do not become Flex items.\n- images[].pngPath: PNG file embedded into the .riv. mesh enables vertex deformation; vertices addressed as \"<imageId>#v<row>_<col>\" (row 0 = top), coordinates in the image's natural pixel space centered at origin. Mesh vertex tracks support x/y only.\n- texts[].followPath {\"path\":\"<shapes[].id>\",\"start\":0,\"end\":1,\"offset\":0,\"strength\":1,\"orient\":true} bends the text along that shape's path (text on path; start/end/offset are 0-1 fractions of the path length). Needs fonts[] like any text.\n- groups are Nodes usable as parents (parent) of shapes/images for rig hierarchies and pivots; animatable like shapes.\n- transitions support exitTimeMs (play source animation this long before transitioning).\nMotion presets (tuned amplitudes and easings; about 10x fewer tokens than hand-authored keyframes):\n\"animations\":[{\"name\":\"intro\",\"duration\":90,\"presets\":[\n  {\"preset\":\"pop-in\",\"target\":\"logo\"},\n  {\"preset\":\"rise-in\",\"targets\":[\"c1\",\"c2\",\"c3\"],\"at\":12,\"stagger\":4},\n  {\"preset\":\"float\",\"target\":\"logo\"}\n],\"tracks\":[]}]\nAvailable: fade-in rise-in drop-in slide-in pop-in bounce-in | fade-out sink-out slide-out pop-out | pulse heartbeat tada shake wobble | breathing float sway spin glow-pulse blink(for eyelid overlays). Options: at(start frame), stagger(frames between targets), intensity(0.25-3), direction(left|right|up|down), cycleSeconds. Ambient presets (breathing..blink) span the whole animation seamlessly. A preset and a manual track must not drive the same target+property.\nPro features: stroke.trim {start,end,mode} + trimStart/trimEnd tracks (draw-on effect), shapes[].clipBy (mask via an invisible shape), groups[].solo+active + soloActive track with keyframes[].ref (pose/mouth switching), constraints [{type:\"followPath\",item,path}] + followDistance track 0-1 (motion along a path), open paths (closed:false), multi-contour shapes (subpaths), stroke cap/join.\n\"imports\":[{\"spec\":\"logo.scene.json\",\"x\":200,\"y\":150,\"scale\":0.8}] places riv_import_svg / riv_asset_search fragments under a wrapper group (id = file basename) — animate the wrapper or individual shape ids. PREFER imported real vector art over drawing with primitives for anything illustrative.\nRecommended flow: riv_design_tokens → (riv_import_svg / riv_asset_search for artwork) → riv_create (token values + presets + imports) → riv_critique → fix → re-critique.\nShape z-order: later in array = on top; images render above shapes. properties for tracks: x,y,rotation(deg),scaleX,scaleY,opacity(0-1),width,height,fillColor(needs \"color\" in keyframes). Colors: #RRGGBB or #AARRGGBB. rotation in degrees. Easings include emphasized-decel (enters) / emphasized-accel (exits).\nAudio: \"audio\":[{\"id\":\"beep\",\"path\":\"./beep.wav\"}] embeds a WAV/MP3/FLAC file (path resolved relative to cwd, or pass bytes directly). \"events\":[{\"id\":\"beepEvent\",\"type\":\"audio\",\"audio\":\"beep\"}] declares an AudioEvent bound to that clip. Trigger it either from a state machine state (\"states\":[{\"name\":\"s1\",\"fireEvent\":\"beepEvent\"}]) or at specific frames inside a timeline via animations[].events: {\"name\":\"anim1\",\"duration\":60,\"tracks\":[...],\"events\":[{\"event\":\"beepEvent\",\"frame\":0},{\"event\":\"beepEvent\",\"frame\":30}]}. NOTE: this server's preview (Canvas2D) does not play audio, so PNG/GIF/video previews and riv_studio stay silent. The AudioAsset/AudioEvent are still written correctly and play in a GPU-backed Rive runtime (WebGL/Skia).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"outPath":{"description":"Output .riv path","type":"string"},"previewTime":{"description":"Seconds into first animation for the preview frame (default 0.4)","type":"number"},"scene":{"additionalProperties":true,"description":"Scene spec with optional Flex layouts (see tool description)","properties":{"layouts":{"items":{"additionalProperties":true,"properties":{"alignItems":{"enum":["start","center","end"],"type":"string"},"direction":{"enum":["row","column"],"type":"string"},"fillColor":{"type":"string"},"gap":{"anyOf":[{"minimum":0,"type":"number"},{"additionalProperties":false,"properties":{"horizontal":{"minimum":0,"type":"number"},"vertical":{"minimum":0,"type":"number"}},"type":"object"}]},"height":{"minimum":0,"type":"number"},"heightMode":{"enum":["fixed","percent","auto","fill"],"type":"string"},"heightWeight":{"exclusiveMinimum":0,"type":"number"},"id":{"type":"string"},"justifyContent":{"enum":["start","center","end","space-between"],"type":"string"},"margin":{"anyOf":[{"minimum":0,"type":"number"},{"additionalProperties":false,"properties":{"bottom":{"minimum":0,"type":"number"},"left":{"minimum":0,"type":"number"},"right":{"minimum":0,"type":"number"},"top":{"minimum":0,"type":"number"}},"type":"object"}]},"padding":{"anyOf":[{"minimum":0,"type":"number"},{"additionalProperties":false,"properties":{"bottom":{"minimum":0,"type":"number"},"left":{"minimum":0,"type":"number"},"right":{"minimum":0,"type":"number"},"top":{"minimum":0,"type":"number"}},"type":"object"}]},"parent":{"type":"string"},"width":{"minimum":0,"type":"number"},"widthMode":{"enum":["fixed","percent","auto","fill"],"type":"string"},"widthWeight":{"exclusiveMinimum":0,"type":"number"},"wrap":{"type":"boolean"}},"required":["id"],"type":"object"},"type":"array"}},"type":"object"}},"required":["outPath","scene"],"type":"object"},"name":"riv_create","title":"Create a .riv file from a scene spec"},{"description":"Modify an existing .riv (lossless roundtrip): set any property, change named text runs, delete objects (with automatic subtree + reference remapping), or edit keyframes on an existing animation (op=setKeyframes). Use riv_dump to find object indices/names. Renders a preview of the result.\nsetKeyframes: target an animated object via index/name(+type), give 'animation' (LinearAnimation name) and 'property' (x/y/rotation/scaleX/scaleY/opacity/width/height — rotation in degrees), then 'keyframes' (array of {frame,value,easing}). 'mode': replace (default, swaps the whole track) | add (appends keyframes, creating the track if absent) | remove (deletes keyframes matching the given frame numbers; keyframes[].value/easing are ignored).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"edits":{"description":"Edit operations, applied in order","items":{"additionalProperties":false,"properties":{"animation":{"description":"op=setKeyframes: LinearAnimation name","type":"string"},"index":{"description":"Target by riv_dump global index","type":"integer"},"keyframes":{"description":"op=setKeyframes: keyframe list (value required unless mode=remove)","items":{"additionalProperties":false,"properties":{"easing":{"description":"Easing for the segment from this keyframe to the next (default linear; hold = step)","enum":["hold","linear","ease","ease-in","ease-out","ease-in-out","ease-out-back","ease-in-back","smooth","snap","emphasized-decel","emphasized-accel"],"type":"string"},"frame":{"description":"Frame number within the animation","minimum":0,"type":"integer"},"value":{"description":"Value at this frame (required unless mode=remove)","type":"number"}},"required":["frame"],"type":"object"},"type":"array"},"mode":{"description":"op=setKeyframes: default replace","enum":["replace","add","remove"],"type":"string"},"name":{"description":"Target by object name (setText: run name; setKeyframes: animated object name)","type":"string"},"op":{"description":"set: properties; setText: text run; delete: object; setKeyframes: animation track","enum":["set","setText","delete","setKeyframes"],"type":"string"},"property":{"description":"op=setKeyframes: animated property (rotation in degrees)","enum":["x","y","rotation","scaleX","scaleY","opacity","width","height"],"type":"string"},"set":{"additionalProperties":{},"description":"op=set: property name -> value (colors as #RRGGBB)","type":"object"},"text":{"description":"op=setText: new text","type":"string"},"type":{"description":"Filter by typeName when targeting by name","type":"string"}},"required":["op"],"type":"object"},"minItems":1,"type":"array"},"outPath":{"description":"Output path (default: overwrite source)","type":"string"},"path":{"description":"Source .riv path","type":"string"}},"required":["path","edits"],"type":"object"},"name":"riv_edit","title":"Edit an existing .riv file"},{"description":"Shrink a .riv without changing its visual output: remove unreferenced objects (dangling easing interpolators, fired-events nothing points to, empty keyframe tracks left over from prior edits) and thin redundant keyframes on strictly-linear-interpolation runs within a tolerance. Only runs where every segment is linear are touched — any run touching hold/cubic easing is left alone, so no easing gets shifted (see keyed_property.cpp semantics: a KeyFrame's interpolationType applies to the segment going INTO the next frame). Colors and id-keyframes (soloActive) are never thinned, only numeric (KeyFrameDouble) tracks. Each step is a boolean that is on by default (set it to false to skip that step), and the run is idempotent/safe to repeat. Use dryRun=true to see the removal/thinning plan without writing anything. Run riv_lint afterwards if in doubt.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"dryRun":{"description":"Report the plan only; don't write anything (default false)","type":"boolean"},"outPath":{"description":"Output path (default: overwrite source)","type":"string"},"path":{"description":"Source .riv path","type":"string"},"removeUnreferenced":{"description":"Remove unreferenced interpolators/events/empty tracks (default true)","type":"boolean"},"thinKeyframes":{"description":"Douglas-Peucker thin redundant keyframes on linear-only runs (default true)","type":"boolean"},"tolerance":{"description":"Thinning tolerance as a ratio of each track's own value range (default 0.01 = 1%, conservative)","maximum":1,"minimum":0,"type":"number"}},"required":["path"],"type":"object"},"name":"riv_optimize","title":"Optimize a .riv file (lossless)"},{"description":"Cut polygon regions out of a character PNG for parts-based rigging (cutout animation). Writes each part as <name>.png plus base.png (source with parts erased) into outDir, and returns each part's bbox for placement. Use with riv_create: images per part + groups as pivots.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"outDir":{"description":"Directory to write part PNGs into","type":"string"},"pngPath":{"description":"Source PNG path","type":"string"},"regions":{"description":"Polygon regions to cut out, one per part","items":{"additionalProperties":false,"properties":{"keepInBase":{"description":"Don't erase this region from base.png","type":"boolean"},"name":{"description":"Part name; the output file is <name>.png","type":"string"},"polygon":{"description":"Polygon vertices in source image pixel coords","items":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"minItems":3,"type":"array"}},"required":["name","polygon"],"type":"object"},"minItems":1,"type":"array"}},"required":["pngPath","outDir","regions"],"type":"object"},"name":"riv_slice_image","title":"Slice a PNG into parts for rigging"},{"description":"One call: character PNG -> fully rigged .riv with cutout parts (ears/tail via polygons), 2-bone head-tilt mesh (seamless), vector eyelid blink, idle + happy animations, and a state machine with a 'happy' trigger. Returns a preview. Fine-tune afterwards with riv_edit or riv_studio.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"artboardHeight":{"description":"Artboard height in px (default 460)","type":"number"},"artboardWidth":{"description":"Artboard width in px (default 600)","type":"number"},"backgroundColor":{"description":"CSS background color (default: transparent)","type":"string"},"eyes":{"description":"Eye rects in image px coords (generates blink overlays)","items":{"additionalProperties":false,"properties":{"height":{"description":"Height in image px","type":"number"},"width":{"description":"Width in image px","type":"number"},"x":{"description":"Left edge in image px","type":"number"},"y":{"description":"Top edge in image px","type":"number"}},"required":["x","y","width","height"],"type":"object"},"type":"array"},"furColor":{"description":"Eyelid/patch color matching the fur (default #f8eee2)","type":"string"},"headRatio":{"description":"Top fraction of the image that is 'head' (default 0.45)","type":"number"},"outPath":{"description":"Output .riv path","type":"string"},"parts":{"additionalProperties":{"additionalProperties":false,"properties":{"behindBody":{"description":"Draw behind the body (e.g. tail)","type":"boolean"},"pivot":{"description":"Attachment point (default: bottom-center of bbox)","items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"polygon":{"description":"Region in image px coords","items":{"items":{"type":"number"},"maxItems":2,"minItems":2,"type":"array"},"minItems":3,"type":"array"}},"required":["polygon"],"type":"object"},"description":"Named cutout parts, e.g. {earL, earR, tail}. Names containing 'ear' attach to the head","type":"object"},"pngPath":{"description":"Character PNG (transparent background recommended)","type":"string"}},"required":["pngPath","outPath"],"type":"object"},"name":"riv_rig_character","title":"Auto-rig a character PNG"},{"description":"Structural diff between two .riv files: type count changes and per-object property differences.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"maxDiffs":{"description":"Max object diffs to list (default 30)","type":"integer"},"pathA":{"description":"Path to the first .riv file","type":"string"},"pathB":{"description":"Path to the second .riv file","type":"string"}},"required":["pathA","pathB"],"type":"object"},"name":"riv_diff","title":"Diff two .riv files"},{"description":"Render a .riv animation (or state machine) to a real-time WebM video using canvas.captureStream() + MediaRecorder (VP9, falls back to VP8/generic webm). Default duration is one loop of the animation (2s for a bare state machine or when the animation's length can't be determined).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"animation":{"description":"Animation name; ignored when stateMachine is set (default: the first state machine, else the first animation)","type":"string"},"artboard":{"description":"Artboard name (default: first artboard)","type":"string"},"background":{"description":"CSS background color (default: transparent)","type":"string"},"duration":{"description":"Seconds to record (default: one animation loop, or 2s)","exclusiveMinimum":0,"maximum":30,"type":"number"},"fps":{"description":"captureStream() frame rate (default 30)","exclusiveMinimum":0,"maximum":60,"type":"integer"},"height":{"description":"Output height in px (default: keeps the artboard aspect ratio)","exclusiveMinimum":0,"maximum":2048,"type":"integer"},"out":{"description":"Output .webm path (default: alongside the .riv)","type":"string"},"path":{"description":"Path to the .riv file","type":"string"},"stateMachine":{"description":"State machine name (takes precedence over animation)","type":"string"},"width":{"description":"Output width in px (default: artboard width)","exclusiveMinimum":0,"maximum":2048,"type":"integer"}},"required":["path"],"type":"object"},"name":"riv_render_video","title":"Render an animation to a WebM video"},{"description":"Render N evenly-spaced frames of a .riv animation/state machine into a single grid sprite sheet PNG (columns = ceil(sqrt(N))). Writes the PNG plus a JSON metadata file (cellW/cellH/cols/rows/count/fps) alongside.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"animation":{"description":"Animation name; ignored when stateMachine is set (default: the first state machine, else the first animation)","type":"string"},"artboard":{"description":"Artboard name (default: first artboard)","type":"string"},"background":{"description":"CSS background color (default: transparent)","type":"string"},"count":{"description":"Number of frames (default 16)","exclusiveMinimum":0,"maximum":256,"type":"integer"},"duration":{"description":"Seconds spanned by the frames (default: one animation loop, or 2s)","exclusiveMinimum":0,"maximum":30,"type":"number"},"fps":{"description":"Metadata playback fps (default: count/duration)","exclusiveMinimum":0,"maximum":60,"type":"integer"},"height":{"description":"Output height in px (default: keeps the artboard aspect ratio)","exclusiveMinimum":0,"maximum":2048,"type":"integer"},"out":{"description":"Output PNG path (default: alongside the .riv); metadata is written next to it with a .json extension","type":"string"},"path":{"description":"Path to the .riv file","type":"string"},"stateMachine":{"description":"State machine name (takes precedence over animation)","type":"string"},"width":{"description":"Output width in px (default: artboard width)","exclusiveMinimum":0,"maximum":2048,"type":"integer"}},"required":["path"],"type":"object"},"name":"riv_render_sprites","title":"Render an animation to a sprite sheet PNG"},{"description":"Render a list of jobs — each a single .riv (rivPath) or a glob of .riv files (glob) — to png/gif/apng/webm/sprites, sequentially reusing the same headless Chromium page (no parallel pages). Built for CI/scripts: call this tool repeatedly from your pipeline instead of expecting a live watch mode — none is provided, since MCP's request/response model doesn't fit a background file watcher. 'defaults' holds options shared across every job; each job's own fields override them. Every job needs a format (in the job or in defaults), or that job fails. One job's failure does not stop the batch — every job (and every file a glob expands to) gets its own success/error/outPath/durationMs entry in the returned report.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"defaults":{"additionalProperties":false,"description":"Shared defaults merged under each job (job-level values win)","properties":{"animation":{"description":"Animation name; ignored when stateMachine is set (default: the first state machine, else the first animation)","type":"string"},"artboard":{"description":"Artboard name (default: first artboard)","type":"string"},"background":{"description":"CSS background color","type":"string"},"count":{"description":"format=sprites: frame count (default 16)","exclusiveMinimum":0,"maximum":256,"type":"integer"},"duration":{"description":"format=gif/apng/webm/sprites: seconds to render (default: one animation loop, or 2s)","exclusiveMinimum":0,"maximum":30,"type":"number"},"format":{"description":"Output format: png, gif, apng, webm or sprites. Required on every job, set here or in defaults","enum":["png","gif","apng","webm","sprites"],"type":"string"},"fps":{"description":"Frames per second (default 20; 30 for webm)","exclusiveMinimum":0,"maximum":60,"type":"integer"},"height":{"description":"Output height in px (default: keeps the artboard aspect ratio)","exclusiveMinimum":0,"maximum":2048,"type":"integer"},"loops":{"description":"format=apng: loop count, 0=infinite (default 0)","minimum":0,"type":"integer"},"outDir":{"description":"Output directory (default: alongside the source .riv)","type":"string"},"stateMachine":{"description":"State machine name (takes precedence over animation)","type":"string"},"time":{"description":"format=png: seconds to advance before capture (default 0)","type":"number"},"transparent":{"description":"format=apng: render on a transparent background (default true)","type":"boolean"},"width":{"description":"Output width in px (default: artboard width; 480 for gif and apng)","exclusiveMinimum":0,"maximum":2048,"type":"integer"}},"type":"object"},"jobs":{"description":"Jobs to render, in order","items":{"additionalProperties":false,"properties":{"animation":{"description":"Animation name; ignored when stateMachine is set (default: the first state machine, else the first animation)","type":"string"},"artboard":{"description":"Artboard name (default: first artboard)","type":"string"},"background":{"description":"CSS background color","type":"string"},"count":{"description":"format=sprites: frame count (default 16)","exclusiveMinimum":0,"maximum":256,"type":"integer"},"duration":{"description":"format=gif/apng/webm/sprites: seconds to render (default: one animation loop, or 2s)","exclusiveMinimum":0,"maximum":30,"type":"number"},"format":{"description":"Output format: png, gif, apng, webm or sprites. Required on every job, set here or in defaults","enum":["png","gif","apng","webm","sprites"],"type":"string"},"fps":{"description":"Frames per second (default 20; 30 for webm)","exclusiveMinimum":0,"maximum":60,"type":"integer"},"glob":{"description":"Glob pattern matching multiple .riv files, e.g. 'samples/**/*.riv' (self-contained matcher: only '*' and '**' are supported, no {a,b} or [abc])","type":"string"},"height":{"description":"Output height in px (default: keeps the artboard aspect ratio)","exclusiveMinimum":0,"maximum":2048,"type":"integer"},"loops":{"description":"format=apng: loop count, 0=infinite (default 0)","minimum":0,"type":"integer"},"outDir":{"description":"Output directory (default: alongside the source .riv)","type":"string"},"rivPath":{"description":"Path to a single .riv file (mutually exclusive with glob)","type":"string"},"stateMachine":{"description":"State machine name (takes precedence over animation)","type":"string"},"time":{"description":"format=png: seconds to advance before capture (default 0)","type":"number"},"transparent":{"description":"format=apng: render on a transparent background (default true)","type":"boolean"},"width":{"description":"Output width in px (default: artboard width; 480 for gif and apng)","exclusiveMinimum":0,"maximum":2048,"type":"integer"}},"type":"object"},"maxItems":200,"minItems":1,"type":"array"}},"required":["jobs"],"type":"object"},"name":"riv_batch_render","title":"Batch-render many .riv files/formats in one call"},{"description":"Extract embedded image/font/audio asset binary contents (ImageAsset/FontAsset/AudioAsset + FileAssetContents pairs) from a .riv file to disk, with the file extension inferred from magic bytes (PNG/JPEG/WEBP/TTF/OTF/WOFF/WOFF2/GIF). Externally-referenced (non-embedded) assets are skipped.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"outDir":{"description":"Output directory (default: <file>.assets alongside the .riv)","type":"string"},"path":{"description":"Path to the .riv file","type":"string"}},"required":["path"],"type":"object"},"name":"riv_extract_assets","title":"Extract embedded assets from a .riv file"},{"description":"Render the same artboard/animation/time from two .riv files under identical conditions (forced to the same output size) and compute a thresholded per-pixel visual diff. Returns match rate, differing pixel count, and a diff visualization PNG (differing pixels in red, matching pixels dimmed).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"animation":{"description":"Animation name; ignored when stateMachine is set (default: the first state machine, else the first animation)","type":"string"},"artboard":{"description":"Artboard name (default: first artboard)","type":"string"},"background":{"description":"CSS background color (default: transparent)","type":"string"},"height":{"description":"Output height in px (default: keeps the artboard aspect ratio)","exclusiveMinimum":0,"maximum":2048,"type":"integer"},"out":{"description":"Output diff PNG path (default: alongside pathA)","type":"string"},"pathA":{"description":"Path to the first .riv file","type":"string"},"pathB":{"description":"Path to the second .riv file","type":"string"},"stateMachine":{"description":"State machine name (takes precedence over animation)","type":"string"},"threshold":{"description":"Max per-channel diff (0-255) still counted as a match (default 16)","maximum":255,"minimum":0,"type":"number"},"time":{"description":"Seconds to advance before capturing (default 0)","type":"number"},"width":{"description":"Output width in px (default: artboard width)","exclusiveMinimum":0,"maximum":2048,"type":"integer"}},"required":["pathA","pathB"],"type":"object"},"name":"riv_visual_diff","title":"Pixel-diff two .riv files"},{"description":"Render the same artboard/animation/state-machine from two .riv files under identical conditions and composite them side by side (horizontal or vertical) into a single GIF/APNG for human review — e.g. a rig before/after an edit, or two design variants. 'A: <file>' / 'B: <file>' labels are burned into each frame by default. If the two files' animation lengths differ, the shorter one holds on its final frame once it ends. Different from riv_visual_diff: that tool computes a per-pixel numeric diff of the SAME thing rendered two ways (for regression testing); this tool is for eyeballing two DIFFERENT things playing side by side (for design review), not measuring a delta.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"animation":{"description":"Animation name, applied to both files (default: first)","type":"string"},"artboard":{"description":"Artboard name, applied to both files (default: first)","type":"string"},"background":{"description":"CSS background per panel (default: white for gif, transparent for apng)","type":"string"},"duration":{"description":"Seconds to render (default: the longer of the two files' own animation lengths)","exclusiveMinimum":0,"maximum":30,"type":"number"},"format":{"description":"Output format (default gif)","enum":["gif","apng"],"type":"string"},"fps":{"description":"Default 20","exclusiveMinimum":0,"maximum":60,"type":"integer"},"height":{"description":"Panel height (default: derived from file A's own aspect ratio)","exclusiveMinimum":0,"maximum":1024,"type":"integer"},"labels":{"description":"Burn 'A: <file>' / 'B: <file>' labels into each frame (default true)","type":"boolean"},"layout":{"description":"Panel arrangement (default horizontal)","enum":["horizontal","vertical"],"type":"string"},"out":{"description":"Output path (default: alongside pathA)","type":"string"},"pathA":{"description":"First .riv file","type":"string"},"pathB":{"description":"Second .riv file","type":"string"},"stateMachine":{"description":"State machine name, applied to both files (takes precedence over animation)","type":"string"},"width":{"description":"Panel width (default 320); panel height is derived from file A's aspect ratio and then forced onto file B so both panels align","exclusiveMinimum":0,"maximum":1024,"type":"integer"}},"required":["pathA","pathB"],"type":"object"},"name":"riv_ab_compare","title":"Render two .riv files side by side for visual A/B review"},{"description":"Start a local web UI (Rive-editor-like 3-pane layout) for live-previewing and editing a .riv file: hierarchy tree + click/drag selection on canvas + inspector (position/size/color/text edits apply live), timeline with keyframe markers, hot reload on file change, auto-generated state machine input controls, event log, and (with scenePath) direct scene-JSON editing. The UI also has an 'Instructions for AI' box — fetch those with riv_studio_notes. Re-running riv_create/riv_edit on the watched file updates the browser instantly. Only one studio runs at a time.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"path":{"description":"The .riv file to preview (watched for changes)","type":"string"},"port":{"description":"Port (default 8787)","type":"integer"},"scenePath":{"description":"Scene spec JSON path — enables the edit+rebuild panel","type":"string"},"share":{"description":"Also open a READ-ONLY view on the LAN (default false: Studio listens on 127.0.0.1 only). Returns a URL with an unguessable token; viewers can play/scrub/drive state-machine inputs but cannot edit, save, chat or write files. Plain HTTP, so only share on a network you trust.","type":"boolean"},"shareHost":{"description":"Local IPv4 address to listen on for the read-only view (default: the auto-detected LAN address; '0.0.0.0' = all interfaces)","type":"string"},"sharePort":{"description":"Port for the read-only view (default: port + 1)","type":"integer"},"stop":{"description":"Stop the running studio instead","type":"boolean"}},"required":["path"],"type":"object"},"name":"riv_studio","title":"Start the local Studio web UI"},{"description":"Read the Studio web UI's Agent chat and reply into it.\n1) READ: call with no `reply` to fetch the messages the user typed (consumes the queue; the Studio shows them as picked up). Trigger on 'check the studio notes' / 「スタジオの指示を確認して」, or after opening riv_studio when the user mentions they left notes. Act on each instruction — usually riv_edit or riv_create on the watched file, which hot-reloads the browser.\n2) REPLY: after doing the work, call again with `reply` set to a short summary of what you changed (and anything you could not do). It appears as your message in the same chat. Always reply: without a reply the user cannot tell whether you acted. Both can be done in one call: pass `reply` together with the read to answer and pick up anything new at the same time.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"peek":{"description":"Read without consuming","type":"boolean"},"port":{"description":"Studio port (default 8787)","type":"integer"},"reply":{"description":"Message to post back into the Studio chat as the assistant (what you changed, what you skipped, what you need)","type":"string"}},"type":"object"},"name":"riv_studio_notes","title":"Read the Studio chat and reply into it"},{"description":"Find the rectangles, text runs and images in a UI screenshot or design comp. Returns a nested element tree with rects, corner radii and fill colours, plus a numbered overlay PNG. Coordinates are in source pixels (accurate to about 1-2 px); corner radii to about 1 px. Each element carries renderMode (\"vector-panel\" | \"raster\" — how it would be reconstructed; flat fills are test-rendered and turned into crops when more than 2% of their visible pixels would differ, the measured share is returned as renderRisk) and semanticHint (\"panel\" | \"text\" | \"image\" | \"line\" — what it looks like) as independent fields. Next, give each element a role and pass the result to riv_ui_prototype. This is geometry only: it does not know a button from a card. If you have the vector source, pass svgPath instead of imagePath: nothing is estimated, the element tree is the SVG's own group nesting, non-rectangular artwork comes through as \"vector-shape\" with its real bezier vertices, <text> becomes \"vector-text\" (editable Rive text — the bundled Inter is substituted unless you pass fonts, and a run whose glyphs are missing is baked as a picture instead, always with a warning), embedded <image> data comes through as its own pixels, and Figma layer names arrive as roleHint.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"figmaUrl":{"description":"A Figma link to one frame (Copy link to selection), fetched as SVG through the Figma REST API. Off unless FIGMA_TOKEN is set in the server's environment; without it this errors and nothing is requested. Everything else works offline","type":"string"},"fonts":{"description":"Fonts for the SVG's <text>. svgPath only — pass the same list to riv_ui_prototype","items":{"additionalProperties":false,"properties":{"family":{"description":"The SVG font-family this file is for. Omit to use it for every run","type":"string"},"path":{"description":"Path to a .ttf/.otf file","type":"string"}},"required":["path"],"type":"object"},"type":"array"},"imagePath":{"description":"Screenshot or design comp (PNG/JPEG)","type":"string"},"maxElements":{"description":"Keep at most this many elements, largest first (default 120, or 300 for svgPath)","type":"number"},"minArea":{"description":"Ignore regions smaller than this many pixels (default 576). imagePath only","type":"number"},"overlayPath":{"description":"Where to write the numbered overlay PNG","type":"string"},"svgPath":{"description":"Vector source instead of a screenshot (Figma/Illustrator SVG export). Nothing is estimated: rects, fills, corner radii and nesting come straight from the file","type":"string"}},"type":"object"},"name":"riv_ui_detect","title":"Detect UI elements in a screenshot"},{"description":"Take the elements from riv_ui_detect, assign each one a role, and get back a working .riv: every element becomes a shape or an image asset, each gets an entrance appropriate to its role, and buttons and cards get hover and press states. Roles: background, nav, header, card, panel, button, fab, text, icon, image, chart, list-item, badge, divider, avatar, input. Elements you leave unassigned animate as a generic panel. Pass exactly one of imagePath, svgPath or figmaUrl, the same one you gave riv_ui_detect. If you changed minArea or maxElements there, pass the same values here so the ids match. With svgPath no screenshot is embedded, every element stays editable, and the file reproduces the SVG; its <text> becomes real Rive text you can re-type at runtime, and its embedded <image> data becomes an image asset. figmaUrl fetches the same thing straight from Figma, and needs FIGMA_TOKEN.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"ambient":{"description":"Give roles with an idle motion a looping ambient animation (default true)","type":"boolean"},"entranceMs":{"description":"How long the whole entrance takes, in milliseconds","type":"number"},"figmaUrl":{"description":"The same Figma link you passed to riv_ui_detect. Off unless FIGMA_TOKEN is set in the server's environment. The frame is fetched again, so a design that changed in between can move the ids","type":"string"},"fonts":{"description":"Fonts for the SVG's <text>. svgPath only. Without a match the bundled Inter is used and a warning says so; a run whose glyphs the font lacks (CJK, say) is baked as a picture rather than embedded as tofu","items":{"additionalProperties":false,"properties":{"family":{"description":"The SVG font-family this file is for. Omit to use it for every run","type":"string"},"path":{"description":"Path to a .ttf/.otf file","type":"string"}},"required":["path"],"type":"object"},"type":"array"},"imagePath":{"description":"The same screenshot you passed to riv_ui_detect","type":"string"},"interactions":{"description":"Add hover and press states where the role has them (default true)","type":"boolean"},"maxElements":{"description":"Must match the riv_ui_detect call (default 120, or 300 for svgPath)","type":"number"},"minArea":{"description":"Must match the riv_ui_detect call. imagePath only (default 576)","type":"number"},"outPath":{"description":"Where to write the .riv","type":"string"},"roles":{"description":"Role for each element. Ids you omit fall back to a generic panel.","items":{"additionalProperties":false,"properties":{"id":{"description":"Element id from riv_ui_detect","type":"number"},"name":{"description":"Name for this object inside the .riv","type":"string"},"role":{"description":"One of the roles listed in the description","type":"string"}},"required":["id","role"],"type":"object"},"type":"array"},"stagger":{"description":"Delay between elements entering, in milliseconds","type":"number"},"svgPath":{"description":"The same SVG you passed to riv_ui_detect (instead of imagePath)","type":"string"}},"required":["outPath","roles"],"type":"object"},"name":"riv_ui_prototype","title":"Turn a detected UI screenshot into an animated .riv"},{"description":"One-time setup: copies the bundled `rive-design-guidelines` skill (the mandatory tokens → pro-asset ingestion → presets → critique workflow, asset-source registry, icon-animation recipes and craft rules) into the client's skills directory so it auto-triggers on future Rive work — .claude/skills/ in the current project (scope=project, default) or ~/.claude/skills/ for all projects (scope=user). Idempotent: re-running updates the skill to this server version's copy. Recommended on first use of this server in a new environment; clients without skill support can read the same content via the rive-design-guidelines MCP prompt instead.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"projectDir":{"description":"Project root for scope=project (default: current working directory)","type":"string"},"scope":{"description":"project = <projectDir>/.claude/skills (default), user = ~/.claude/skills","enum":["project","user"],"type":"string"}},"type":"object"},"name":"riv_setup","title":"Install the bundled rive-design-guidelines skill into this environment"}]}}}
