Table of Contents

TTMSMCPPromptMessages Class

The conversation an expanded prompt hands back, as an ordered list of messages.

API unit family: TMS.MCP.Prompts Inherits from: TOwnedCollection

Syntax

TTMSMCPPromptMessages = class(TOwnedCollection)

Remarks

The collection owns its messages and frees them. A handler builds one collection per call and hands over ownership of it, so the caller is the one that releases it once it has been published.

Properties

Name Description
Items Messages in the conversation, addressed by their position.

Methods

Name Description
Add Appends an empty message and returns it so its speaker and text can be set.
AddAssistantMessage Appends a message spoken by the assistant, for example to seed the conversation with an expected form of answer.
AddUserMessage Appends a message spoken by the user.
ToJSON Builds the message list published for the expanded prompt.

Used by