Table of Contents

TTMSMCPToolPropertyBuilder Class

Fluent builder for one input parameter of a tool. It is reached from the tool builder's add-property step and left again with its end step, which appends the finished parameter to the tool and hands control back to the tool builder.

API unit family: TMS.MCP.Tools

Syntax

TTMSMCPToolPropertyBuilder = class

Remarks

Every step is a class function returning the builder class, so the chain is written on the class rather than on an instance. The parameter under construction is kept in class-level state, so only one parameter can be configured at a time and the chain must be closed with the end step before another is started.

Methods

Name Description
AddArrayItemProperty Describes one field of the objects held by an array-of-objects parameter. Call it once per field to build up the item schema.
AddEnum Adds one accepted value to the closed set published for the parameter.
AddEnums Adds several accepted values at once to the closed set published for the parameter.
AsArrayOfBooleans Types the parameter as an array of Boolean values.
AsArrayOfDoubles Types the parameter as an array of floating-point numbers, which is the ptArrayOfFloats type published as an array with number items.
AsArrayOfIntegers Types the parameter as an array of integers.
AsArrayOfObjects Types the parameter as an array of objects. Describe the shape of those objects with the add-array-item-property step.
AsArrayOfStrings Types the parameter as an array of strings.
Description Sets the description published with the parameter, which is what a model reads to decide what to pass.
Initialize Starts a new input parameter for the tool currently under construction. It is called by the tool builder's add-property step rather than directly.
Name Sets the name the parameter is published and addressed under.
ObjectClass Points an object parameter at the class whose published members describe its shape, so the parameter publishes a full nested schema instead of a bare object type. The expansion applies to a tool that runs through a positional callback.
PropertyType Sets the declared type of the parameter, which drives both the published schema type and the conversion of the incoming value.
Required Marks the parameter as required or optional. Parameters are required by default, so call this step with False to make one optional.