mcp_kit.prompts.interfaces
Interface definitions for prompt engines.
PromptEngine
class PromptEngine(ConfigurableMixin)
Interface for generating prompt responses for MCP get_prompt calls.
Prompt engines can resolve a request from an MCP client to instantiate a prompt with specific arguments.
generate
@abstractmethod
async def generate(target_name: str,
prompt: Prompt,
arguments: dict[str, str] | None = None) -> GetPromptResult
Generate an MCP get_prompt response.
Arguments:
target_name
: Name of the target that would handle the prompt callprompt
: The MCP prompt definitionarguments
: Arguments that would be passed to the prompt
Returns:
Generated prompt result response