Table of Contents

TTMSMCPTool.OnGenerateInputSchema Event

Occurs while the tool serializes itself, giving the handler the chance to supply a hand-written input schema. When the handler returns a non-empty string, that JSON replaces the schema derived from the tool's parameters; when it returns an empty string, the generated schema is kept.

API unit family: TMS.MCP.Tools Declaring type: TTMSMCPTool

Syntax

OnGenerateInputSchema: TTMSMCPGenerateInputSchemaEvent;

Remarks

The event is raised once per serialization of the tool descriptor, that is, every time the tool is included in an answer to a list request, and before the parameter-derived schema is built.

Parameters

Name Description
ATool The tool being serialized, so one handler can serve several tools.
AInputSchema Receives the replacement schema. It arrives empty; assign valid JSON describing an object schema to override the generated one, or leave it empty to keep the generated schema. A non-empty value that does not parse as JSON fails the serialization with a parse error.