TTMSMCPToolPropertyBuilder.AddArrayItemProperty Method
Describes one field of the objects held by an array-of-objects parameter. Call it once per field to build up the item schema.
API unit family: TMS.MCP.Tools
Declaring type: TTMSMCPToolPropertyBuilder
Syntax
class function AddArrayItemProperty(const AName: string; AType: TTMSMCPToolPropertyType; const ADescription: string = ''; ARequired: Boolean = False): TTMSMCPToolPropertyBuilderClass;
Parameters
| Name | Description |
|---|---|
AName |
Name of the field inside each array item. It must not be blank. |
AType |
Type of the field. |
ADescription |
Description of the field. Omitted from the schema when empty. |
ARequired |
When True, every array item must carry the field. Defaults to False. |
Returns
The property builder class, so the configuration can be chained.
Exceptions
| Exception | Description |
|---|---|
EJsonRpcException |
Raised with an invalid-parameters code when the field name is blank. |