MCP tool-use adapter.
The adapter optimizes tool descriptions/system prompts for tasks that require
a model to choose and call MCP tools. It supports dependency-free testing via
GEPA.Adapters.MCP.Client.Static, while the transport boundary is represented
by GEPA.Adapters.MCP.Client.
Summary
Functions
Build the tool-use system prompt for a candidate and available tool schemas.
Extract a plain-text result from common MCP tool response shapes.
Generate reflective feedback for an MCP tool-use trajectory.
Types
@type t() :: %GEPA.Adapters.MCP{ answer_generator: term(), base_system_prompt: term(), client: term(), enable_two_pass: term(), failure_score: term(), metric_fn: term(), model: term(), remote_headers: term(), remote_transport: term(), remote_url: term(), scoring_fn: term(), server_params: term(), task_model: term(), tool_names: term(), tool_selector: term(), two_pass?: term() }
Functions
Build the tool-use system prompt for a candidate and available tool schemas.
Extract a plain-text result from common MCP tool response shapes.
@spec generate_tool_feedback(map() | GEPA.Adapters.MCP.Trajectory.t(), number()) :: String.t()
Generate reflective feedback for an MCP tool-use trajectory.