TTMSMCPPrompts.RegisterPrompt Method
Publishes a prompt that takes no declared arguments in a single call.
API unit family: TMS.MCP.Prompts
Declaring type: TTMSMCPPrompts
Syntax
procedure RegisterPrompt(const AName, ADescription: string; APromptMethod: TTMSMCPPromptMethod);
Remarks
The new prompt declares no arguments; add them afterwards through the prompt's own argument set when the handler needs values.
Parameters
| Name | Description |
|---|---|
AName |
Identifier clients ask for the prompt by. Must not be empty and must not already be registered. |
ADescription |
Text telling a model what the prompt is for. May be empty. |
APromptMethod |
Code that produces the conversation. Must be assigned. |
Exceptions
| Exception | Description |
|---|---|
EJsonRpcException |
Raised with invalid-parameters, error code -32602, when the name is empty, a prompt with the same name is already registered, or no handler is supplied. |