TTMSMCPPromptMethod Event Type
Anonymous method that turns the arguments supplied for a prompt into the conversation that is handed back to the client.
API unit family: TMS.MCP.Prompts
Remarks
The handler runs on the thread that is serving the request. An exception raised inside it is reported to the client as a failed operation, error code -32004, carrying the exception message.
Parameters
| Name | Description |
|---|---|
Args |
Values for the declared arguments, in the order the arguments were declared rather than by name. Every value arrives as text, and an argument the client left out arrives empty, so check before using an optional one. |
Returns
A newly created collection of messages. Ownership passes to the caller, so build a fresh collection on every call and never hand back one that is kept elsewhere. Returning nil is tolerated and yields an empty conversation.