### Configure MYSQL Tool with JSON Source: https://docs.msty.studio/features/toolbox/tools Example JSON configuration for a MYSQL tool within Msty Studio's Toolbox. This configuration specifies the command to run, arguments to pass, and environment variables required for the tool. Ensure that dependency programs like 'uv' are installed locally. ```json { "command":"uv", "args": [ "--directory", "{dbPath:Database Path:/path/to/database.db}", "run","mysql_mcp_server" ], "env":{ "MYSQL_HOST":"{Database Host}", "MYSQL_PORT":"{Database Port}", "MYSQL_USER":"{Database User}", "MYSQL_PASS":"{Database Password}", "MYSQL_DB":"{Database Name}" } } ``` -------------------------------- ### Install Python and uv on Windows using WinGet Source: https://docs.msty.studio/features/toolbox/tool-dependencies This snippet shows the WinGet commands to install Python 3.12 and the uv package manager on a Windows machine. Ensure WinGet is installed first. These commands install the specified versions system-wide. ```bash winget install -e --id Python.Python.3.12 --scope machine winget install --id=astral-sh.uv -e ``` -------------------------------- ### Example Msty Studio Tool Configuration Source: https://docs.msty.studio/features/toolbox/tool-dependencies This JSON configuration defines a tool for Msty Studio that uses 'uvx' to execute the 'mcp-request' command. This is an example of how to set up a custom tool within the Msty Studio environment after dependencies are configured. ```json { "command": "uvx", "args": ["mcp-request"] } ``` -------------------------------- ### Check Node Installation Path Source: https://docs.msty.studio/features/toolbox/tools Command to check the installation path of the Node.js executable on your system. This is useful for verifying Node.js installation and identifying potential issues with package managers like NVM. ```bash which node ``` -------------------------------- ### Install Deb Package (Linux) Source: https://docs.msty.studio/getting-started/download This command installs the Msty Studio deb package on Debian-based Linux distributions. It requires superuser privileges to install system-wide. ```bash sudo apt install ./.deb ``` -------------------------------- ### Start Sidecar from Command Line (macOS) Source: https://docs.msty.studio/how-tos/sidecar This command is used to launch the Msty Sidecar application from the macOS command line. It can be useful for troubleshooting issues with local service detection. ```shell open -a MstySidecar ``` -------------------------------- ### Enable Tailscale Serve Source: https://docs.msty.studio/how-tos/setup-tailscale-for-sidecar Enables the Tailscale Serve feature, which allows Tailscale to proxy HTTP traffic to local services. After running this command, you will receive a URL to enable HTTPS for the service. ```bash tailscale serve ``` -------------------------------- ### Processing API Response Example Source: https://docs.msty.studio/features/toolbox/live-contexts This example demonstrates how to stringify API response data using JavaScript. It is commonly used as a processing function for Live Contexts in Msty Studio to ensure the data is in a string format suitable for model interpretation. ```javascript return JSON.stringify(data) ``` -------------------------------- ### Set Tailscale Serve Path for Sidecar Source: https://docs.msty.studio/how-tos/setup-tailscale-for-sidecar Configures Tailscale Serve to proxy traffic to a specific local port, typically used for Sidecar. This command maps a URL path to the specified port, allowing remote access to the service running on that port. The example uses port 11932, which is common for Sidecar. ```bash tailscale serve --set-path=sidecar 11932 ``` -------------------------------- ### Create Tailscale Alias (macOS) Source: https://docs.msty.studio/how-tos/setup-tailscale-for-sidecar Creates a command alias for the Tailscale application on macOS. This simplifies running Tailscale commands from the terminal by shortening the path to the executable. It's a prerequisite for executing further Tailscale commands. ```bash alias tailscale="/Applications/Tailscale.app/Contents/MacOS/Tailscale" ``` -------------------------------- ### Change Sandbox Ownership (Linux) Source: https://docs.msty.studio/getting-started/download This command changes the ownership of the Msty Studio sandbox executable to the root user. This is part of a workaround for potential permission issues during installation or execution on Linux. ```bash sudo chown root:root /opt/MstyStudio/chrome-sandbox ``` -------------------------------- ### Run AppImage with Specific GTK Version (Linux) Source: https://docs.msty.studio/getting-started/download This command launches the Msty Studio AppImage while specifying the GTK version to use. This can help resolve compatibility issues when both GTK 2/3 and GTK 4 are present in the environment. ```bash ./MstyStudio_x86_64.AppImage --gtk-version=3 ``` -------------------------------- ### Make AppImage Executable (Linux) Source: https://docs.msty.studio/getting-started/download This command changes the permissions of the downloaded AppImage file, making it executable. This is a necessary step before you can run the AppImage on Linux systems. ```bash chmod a+x ./.AppImage ``` -------------------------------- ### Optimize Msty Studio DB (Linux/Mac) Source: https://docs.msty.studio/getting-started/quick-start Shell script to optimize the Msty Studio SQLite database on Linux and macOS. It closes the database, creates a SQL dump, rebuilds the database from the dump, and performs integrity checks and optimization. This process helps in reducing database file size and improving performance. ```shell # Close the database properly first to merge WAL files sqlite3 msty.db "PRAGMA wal_checkpoint(FULL);" # Create a fresh export that includes all data sqlite3 msty.db ".output msty_temp.sql" ".dump" ".exit" # Create a completely new database from the dump rm -f msty_copy.db msty_copy.db-shm msty_copy.db-wal sqlite3 msty_copy.db ".read msty_temp.sql" rm msty_temp.sql # Optimize the new database sqlite3 msty_copy.db "PRAGMA integrity_check;" sqlite3 msty_copy.db "PRAGMA optimize;" sqlite3 msty_copy.db "VACUUM;" # Verify database access echo "Verification:" sqlite3 msty_copy.db "SELECT COUNT(*) FROM chat_session_folders;" # Compare file sizes echo "Original size:" du -h msty.db echo "Optimized copy size:" du -h msty_copy.db echo "Done! You can now import msty_copy.db" ``` -------------------------------- ### Dummy JSON Data (Posts) Source: https://docs.msty.studio/how-tos/live-context-examples Provides dummy JSON data for posts, useful for testing. ```APIDOC ## GET https://jsonplaceholder.typicode.com/posts ### Description Returns a list of dummy blog post objects, including user ID, ID, title, and body. Ideal for frontend testing and prototyping. ### Method GET ### Endpoint https://jsonplaceholder.typicode.com/posts ### Parameters None ### Request Example None ### Response #### Success Response (200) - **userId** (integer) - The ID of the user who created the post. - **id** (integer) - The unique identifier for the post. - **title** (string) - The title of the post. - **body** (string) - The content of the post. #### Response Example ```json [ { "userId": 1, "id": 1, "title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit", "body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto" }, { "userId": 1, "id": 2, "title": "qui est esse", "body": "est rerum tempore vitae\nsequi sint nihil reprehenderit dolor beatae ea dolores neque\nfugiat blanditiis voluptate porro vel nihil molestiae ut reiciendis\nqui aperiam non optio sequi sint nihil reprehenderit" } ] ``` ``` -------------------------------- ### Run AppImage with Sandbox Disabled (Linux) Source: https://docs.msty.studio/getting-started/download This command executes the Msty Studio AppImage. The --no-sandbox flag disables the application's sandbox, which can sometimes resolve issues with certain Linux configurations. ```bash ./.AppImage --no-sandbox ``` -------------------------------- ### Run Msty Studio with SSL Disabled (Windows) Source: https://docs.msty.studio/getting-started/download This command allows Msty Studio to bypass SSL certificate verification issues, often encountered in corporate environments. It temporarily sets the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' before executing the Msty Studio application. ```powershell $env:NODE_TLS_REJECT_UNAUTHORIZED="0"; & ``` -------------------------------- ### Change Sandbox Permissions (Linux) Source: https://docs.msty.studio/getting-started/download This command sets the special SUID (set user ID) permission on the Msty Studio sandbox executable. This allows the sandbox to run with elevated privileges, which is often necessary for its proper functioning. ```bash sudo chmod 4755 /opt/MstyStudio/chrome-sandbox ``` -------------------------------- ### Optimize Msty Studio DB (Windows PowerShell) Source: https://docs.msty.studio/getting-started/quick-start PowerShell script to optimize the Msty Studio SQLite database on Windows. It performs similar steps to the Linux/Mac script: closing the database, creating a SQL dump, rebuilding the database, and optimizing it. This script is designed for use within PowerShell and includes Windows-specific commands for file operations and output. ```powershell # Close the database properly first to merge WAL files sqlite3 msty.db "PRAGMA wal_checkpoint(FULL);" # Create a fresh export that includes all data sqlite3 msty.db ".output msty_temp.sql" ".dump" ".exit" # Create a completely new database from the dump Remove-Item -Path msty_copy.db, msty_copy.db-shm, msty_copy.db-wal -ErrorAction SilentlyContinue sqlite3 msty_copy.db ".read msty_temp.sql" Remove-Item msty_temp.sql # Optimize the new database sqlite3 msty_copy.db "PRAGMA integrity_check;" sqlite3 msty_copy.db "PRAGMA optimize;" sqlite3 msty_copy.db "VACUUM;" # Verify database access Write-Host "Verification:" -ForegroundColor Green sqlite3 msty_copy.db "SELECT COUNT(*) FROM chat_session_folders;" # Compare file sizes Write-Host "`nOriginal size:" -ForegroundColor Green Get-Item msty.db | Select-Object Name, @{Name="Size";Expression={"{0:N2} MB" -f ($_.Length / 1MB)}} Write-Host "`nOptimized copy size:" -ForegroundColor Green Get-Item msty_copy.db | Select-Object Name, @{Name="Size";Expression={"{0:N2} MB" -f ($_.Length / 1MB)}} Write-Host "`nDone! You can now import msty_copy.db" -ForegroundColor Green ```