Skip to main content

mcp_kit.generators.interfaces

Interface definitions for response generators.

ResponseGenerator

class ResponseGenerator(ConfigurableMixin)

Interface for generating response data for an MCP call_tool.

Response generators create synthetic responses for MCP tool calls, which is useful for testing, mocking, or simulation scenarios.

generate

@abstractmethod
async def generate(target_name: str,
tool: Tool,
arguments: dict[str, Any] | None = None) -> list[Content]

Generate an MCP call tool response.

Arguments:

  • target_name: Name of the target that would handle the tool call
  • tool: The MCP tool definition
  • arguments: Arguments that would be passed to the tool

Returns:

List of generated content responses