Overview
Registers a cleanup callback that runs before the app’s iframe is destroyed. Use this to save state, close connections, or perform other cleanup.Wraps onteardown
MCP Apps SDK reference
Import
Signature
Parameters
() => Promise<void> | void
required
Cleanup function to run before app destruction.
Returns
void
This hook does not return a value.