TTMSMCPTarget Class
One class or object the server reflects over to discover tools, resources and prompts.
API unit family: TMS.MCP.Attributes.Server
Inherits from: TCollectionItem
Syntax
TTMSMCPTarget = class(TCollectionItem)
Remarks
A target may be declared as a class, as an object, or as both. With only a class set, the reflection pass registers class methods only, because there is no instance to call an ordinary method on. With an object set, the class is derived from it and both class methods and instance methods are registered.
Properties
| Name | Description |
|---|---|
| OwnsObject | Determines whether destroying the target also destroys the object it refers to. |
| TargetClass | Class the server reflects over. |
| TargetComponent | Component used as the target, which is how a target is set at design time. |
| TargetObject | Object whose methods the server invokes. |