TTMSMCPStellarDS Class
Ready-made tool set that exposes a StellarDS backend - its projects, tables, fields and records - as tools a model can call.
API unit family: TMS.MCP.StellarDS
Inherits from: TTMSMCPCloudBase
Syntax
TTMSMCPStellarDS = class(TTMSMCPCloudBase)
Remarks
Every public function of this class carries the tool attribute, so an attributed server built over one instance publishes sixteen callable tools in a single step: six for record data, four for field metadata, four for tables and two for projects. A model connected to that server can then read and write the hosted data without any further code. The intended way to stand this up is TTMSMCPServerFactory.CreateFromObject(AInstance), which reflects over the instance and builds the whole tool set from the attributes; the sixteen functions never have to be registered by hand. A complete setup is therefore four statements: create the component, set Mode to moSync, assign AccessToken, and pass the instance to that factory before starting the server. Setting the mode is not optional: a new instance starts in moAsync, where every function returns nil and no data reaches the client. A ready-to-build server that does exactly this ships with the product under Demos\MCP Server\StellarDS. It is a console program that serves over standard input and output and takes the token on the command line, and its read-me carries the matching client configuration. All calls go to https://api.stellards.io under the /v1/ path, and each one sends AccessToken as a bearer token in the authorization header. Calls are built on the single request and result objects the base component owns, so calls on one instance must not overlap; give each concurrent caller its own instance. A failing call is not reported as an exception. The function answers nil and the response code and body of the attempt stay readable on the result object of the base component until the next call replaces them.
Properties
| Name | Description |
|---|---|
| AccessToken | Token sent as the bearer credential in the authorization header of every request. |
| Mode | Selects whether a call runs on a background task and returns nil, or blocks and returns the parsed response. |
Methods
| Name | Description |
|---|---|
| ClearTable | Deletes every record of a table while leaving the table and its fields in place. |
| CreateField | Adds a field to a table. |
| CreateRecords | Inserts one or more records into a table. |
| DeleteField | Removes a field from a table. |
| DeleteRecord | Deletes a single record from a table. |
| DeleteRecords | Deletes several records from a table in one call. |
| DeleteTable | Removes a table, together with its fields and every record in it. |
| UpdateField | Changes the name and the type of an existing field. |
| UpdateRecords | Writes the same set of field values to one or more existing records. |