Skip to main content

Full Example

Production-ready Svelte example with runes and actions

Quick start

The pattern

Use onMount/onDestroy for lifecycle management:

SvelteKit SSR

Add the browser check to avoid SSR errors:

Using actions

Svelte actions encapsulate tool registration cleanly:

Common issues

Move registration to +layout.svelte for persistence across routes.

Development

Use Chrome DevTools MCP for AI-driven development - your AI can write, discover, and test tools in real-time.