Skip to main content
sunpeak API

Overview

The useToolInfo hook returns metadata about the tool call that instantiated the current app. It is a convenience wrapper around useHostContext.

Wraps onhostcontextchanged

MCP Apps SDK reference

Import

Signature

Returns

return
ToolInfo | undefined
Metadata about the tool call, or undefined if not available.

Usage

The tool info comes from McpUiHostContext.toolInfo.