TTMSMCPPrompts.FindByName Method
Looks up a prompt by the identifier clients ask for it by.
API unit family: TMS.MCP.Prompts
Declaring type: TTMSMCPPrompts
Syntax
function FindByName(const AName: string): TTMSMCPPrompt;
Remarks
A request naming a prompt that is not found is answered with a prompt-not-found error, code -32003.
Parameters
| Name | Description |
|---|---|
AName |
Identifier to look for, compared case-sensitively. |
Returns
The matching prompt, which stays owned by the collection and must not be freed, or nil when no prompt carries that name.
Exceptions
| Exception | Description |
|---|---|
EJsonRpcException |
Raised with invalid-parameters, error code -32602, when the name is empty. |