Skip to main content
Table of Contents

TTMSMCPPromptArguments.Add Method

Appends an empty, optional argument and returns it so its properties can be filled in.

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

Overloads

Overload 1

Appends an empty, optional argument and returns it so its properties can be filled in.

TMS.MCP.Prompts.hppPascalC++
function Add: TTMSMCPPromptArgument; overload;
HIDESBASE TTMSMCPPromptArgument* __fastcall Add()/* overload */;

Returns

The new argument, which stays owned by the collection.

Overload 2

Appends a fully described argument in one call.

TMS.MCP.Prompts.hppPascalC++
function Add(const AName, ADescription: string; ARequired: Boolean = False): TTMSMCPPromptArgument; overload;
HIDESBASE TTMSMCPPromptArgument* __fastcall Add(const System::UnicodeString AName, const System::UnicodeString ADescription, bool ARequired = false)/* overload */;

Remarks

Names are not checked for duplicates; two arguments sharing a name both receive the same supplied value.

Parameters

Name Description
AName Key the value is supplied under. Must not be empty.
ADescription Explanation of what should be supplied. May be empty.
ARequired Whether a value has to be supplied. Optional by default.

Returns

The new argument, which stays owned by the collection.

Exceptions

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