Table of Contents

TTMSMCPPromptBuilder.Build Method

Checks that the prompt is complete and returns it.

API unit family: TMS.MCP.Prompts Declaring type: TTMSMCPPromptBuilder

Syntax

function Build: TTMSMCPPrompt;

Remarks

Each call builds a separate copy, so building twice yields two independent prompts rather than the same one.

Returns

The finished prompt, carrying the name, description, handler, title, icons and every declared argument. It stays owned internally and must not be freed; hand it to a collection, which copies it.

Exceptions

Exception Description
EJsonRpcException Raised with invalid-parameters, error code -32602, when the name is empty or no handler is assigned.