mcp-use TypeScript API
    Preparing search index...

    Function useWidgetState

    Deprecated temporary v1 widget compatibility. New views must use the focused native v2 hooks exported above. Removed in mcp-use v3.

    Use the native v2 view exports above. Removed in mcp-use v3.

    • Read and update v1 widget state.

      Type Parameters

      • TState

      Parameters

      Returns readonly [
          TState
          | null,
          (state: TState | ((previous: TState | null) => TState)) => Promise<void>,
      ]

      Use native v2 model-context APIs. Removed in mcp-use v3.