Documents
Welcome
Introducing
Why Misaki Studio
Compare
Start Here
Learn
Workflows
Export & Ship
AI & MCP
Questions & Answers
Reference
Project interface reference
File types
Page file
Component file
Code Component file
Mockup file
Document file
Document Page file
Content file
Database table file
Users file
API file
Storage file
Script file
Image collection file
Colors file
Fonts file
Design-system Images file
Font Weights file
Radius file
Spacing file
Themes file
Audios file
Videos file
Export Settings file
Environment file
Libraries file
Legacy CMS Model file
Legacy CMS Data file
General file
Element types
Design properties
Keyboard shortcuts
MCP capabilities
Export output reference
Dependencies and compatibility
Browser versus desktop
Current limitations
Troubleshooting
Examples

Script file

A Script is a self-contained TypeScript helper module whose declared synchronous functions can be called from Component expressions.

  • Property: Identity · Current behavior: files below scripts/

  • Property: Workspace · Current behavior: Logic declarations and Code source

  • Property: Value types · Current behavior: scalar/array string, number, boolean; object and object array

  • Property: Component path · Current behavior: scripts.<file>.<function>(…)

  • Property: MCP · Current behavior: create/update/declare/read/call

  • Property: Result · Current behavior: user-authored TypeScript module

Features

Declare functions, stable parameter IDs, return types, and object/array result fields in Logic; implement them in Code. Stable identities preserve stored bindings across supported renames. Signature analysis reports differences between declarations and actual exports.

MCP route

Use create-script, update-script, declare-script-function, get-script, and call-script. Call arguments are keyed by parameter name. Read declarations/source before replacement.

Export, Undo, and limits

Script export preserves the user's TypeScript without the normal generated-file header, but the exported copy is still refreshed from the Misaki project. Keep one source of truth.

Typing bursts shorter than 600 ms coalesce into one undo step, and Preview offers Update rather than rerendering every incomplete burst. Scripts allow no imports, npm packages, React/JSX, DOM access, inter-script imports, or asynchronous callable functions. Use Code Components for rendered JSX.

On this page
Script file
Features
MCP route
Export, Undo, and limits