Table of Contents

TTMSMCPAttributedServer Class

Server that publishes tools, resources and prompts declared with attributes.

API unit family: TMS.MCP.Attributes.Server Inherits from: TTMSMCPServer

Syntax

TTMSMCPAttributedServer = class(TTMSMCPServer)

Remarks

Instead of filling the tool, resource and prompt collections by hand, add the classes and objects that carry the attributes as targets and let the server reflect over them. Every reflection pass clears the three collections first and rebuilds them from all targets, so it is safe to run repeatedly. Both public and published methods are discovered, because the default run-time type information settings emit both visibilities; a private or protected method is not visible and is never published. The server also answers completion requests for prompt arguments that declare candidate values, unless a completion handler was assigned before initialization.

Properties

Name Description
AutoRegister Determines whether the reflection pass runs automatically when the server initializes.
Targets Classes and objects the server reflects over.

Methods

Name Description
AddClass Adds a class as a target and registers the declarations found on it.
AddObject Adds an object as a target and registers the declarations found on it.

Used by