Table of Contents

TTMSMCPToolProperty Class

One input parameter of a tool. Each instance contributes one entry to the tool's input schema and, when required, one name to that schema's required array; at call time it also drives the conversion of the matching JSON parameter into a callback argument.

API unit family: TMS.MCP.Tools Inherits from: TCollectionItem

Syntax

TTMSMCPToolProperty = class(TCollectionItem)

Properties

Name Description
ArrayItemProperties Field descriptions that make up the item schema of an array-of-objects parameter. The collection is only published for the ptArrayOfObjects type; for other array types the element type is derived from the parameter type itself.
Description Description of the parameter, published as its description and omitted when empty. It is the text a model reads to decide what to pass, so it should state the meaning, the expected format and any unit.
EnumValues Closed set of accepted values. When the list is not empty it is published as the enum of the parameter, telling the client to choose one of these values.
Name Name of the parameter. It is the key under which the parameter appears in the input schema and the key the caller must use in the call parameters, so it must be unique within the tool and is matched case sensitively.
ObjectClass Class whose published members describe the shape of an object parameter. When it is assigned and the parameter type is ptObject, the parameter publishes a full nested schema generated from that class instead of a bare object type. The expansion applies to a tool that runs through a positional callback.
PropertyType Declared type of the parameter. It determines the JSON Schema type published for the parameter and the conversion applied to the incoming value. Defaults to ptString.
Required When True, the parameter is listed in the required array of the input schema and a call that omits it is rejected with an invalid-parameters error. When False, an omitted parameter is simply absent from the arguments handed to the callback. Defaults to True.

Methods

Name Description
AddArrayItemProperty Adds a field description to the item schema of an array-of-objects parameter and raises the change notification.
Changed Fires the change notification so the owning tool can discard anything derived from the parameter, such as a cached input schema.
ClearArrayItemProperties Removes every field description from the item schema and raises the change notification.

Events

Name Description
OnChange Occurs whenever any setting of the parameter is assigned or its array item field descriptions change.

Used by