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.
function Add: TTMSMCPPromptArgument; overload;
Returns
The new argument, which stays owned by the collection.
Overload 2
Appends a fully described argument in one call.
function Add(const AName, ADescription: string; ARequired: Boolean = False): TTMSMCPPromptArgument; 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. |