Overview
Returns a function to register tools that the host (or LLM) can call. Uses Standard Schema (Zod, ArkType, Valibot) for input/output validation. The returned handle supportsenable(), disable(), remove(), and update().
For simpler static tool registration, see useAppTools. useRegisterTool provides lower-level control with dynamic registration and Standard Schema support.
The underlying MCP Apps registry sends notifications/tools/list_changed automatically when you register, update, enable, disable, or remove a tool and the View declared tools.listChanged. When the browser provides document.modelContext, the SDK also mirrors registered tools into WebMCP.
Import
Signature
RegisterToolConfig
Returns
Function to register a tool. Returns
undefined if app is not connected.RegisteredAppTool
Usage
useSendToolListChanged() after these registry operations. Use that lower-level hook only when you manage a custom onlisttools result.