Skip to main content
sunpeak API

Overview

Returns a function to send messages to the conversation on behalf of the user. The message appears as a user message and triggers the AI to respond.

Wraps sendMessage

MCP Apps SDK reference

Import

Signature

SendMessageParams

role
'user'
required
Message role.
content
MessageContent[]
required
Array of message content parts.

MessageContent

type
'text'
required
Content type.
text
string
required
Message text content.

Returns

sendMessage
(params: SendMessageParams) => Promise<void>
Function to send a message to the conversation.

Usage