TTMSMCPValues Class
Ordered list of named argument entries, used while converting the JSON call parameters of a tool into callback arguments. The list owns its entries and destroys them with itself. Entries keep the declaration order of the tool's input properties, which is the order a positional callback receives them in.
API unit family: TMS.MCP.Tools
Inherits from: TObjectList<TTMSMCPValue>
Syntax
TTMSMCPValues = class(TObjectList<TTMSMCPValue>)
Properties
| Name | Description |
|---|---|
| Values | Default indexed property giving access to an argument by property name, so an instance can be indexed directly. Reading returns the value stored under the name, or an empty value when no entry with that name exists; new entries are appended with the two-argument add method. |
Methods
| Name | Description |
|---|---|
| Add | Creates a new entry for the given name and value and appends it to the list. The list takes ownership of the entry it creates. |
| FindByKey | Looks up the argument stored under a property name. Comparison is case sensitive and the first matching entry wins. |
| ToValueArray | Flattens the list into the positional argument array handed to a tool callback that takes its arguments by position. |