Interface McpPromptHandler
Programmatic MCP prompt handler contract.
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionProvides the argument schema used for validation and prompt argument advertisement.Provides the MCP prompt description.getName()Provides the MCP prompt name.getTitle()Provides optional prompt title metadata.handle(@NonNull McpPromptHandlerContext context) Handles an MCPprompts/getrequest.
-
Method Details
-
getName
-
getDescription
Provides the MCP prompt description.- Returns:
- the prompt description
-
getTitle
-
getArgumentsSchema
Provides the argument schema used for validation and prompt argument advertisement.- Returns:
- the prompt argument schema
-
handle
Handles an MCPprompts/getrequest.- Parameters:
context- the prompt handler context- Returns:
- the prompt result
- Throws:
Exception- if prompt generation fails
-