Skip to main content
Version: 0.2.0

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 call
  • prompt: The MCP prompt definition
  • arguments: Arguments that would be passed to the prompt

Returns:

Generated prompt result response