GEPA.Adapters.MCP.Client behaviour (GEPA v0.3.0)

Copy Markdown View Source

Minimal MCP client behaviour for GEPA's Elixir adapter layer.

The actual Model Context Protocol transport can be supplied by a caller. For unit tests and local optimization, GEPA.Adapters.MCP.Client.Static provides a deterministic in-memory implementation.

Summary

Functions

Create a dependency-free MCP client transport config.

Types

tool()

@type tool() :: %{required(String.t()) => term()} | %{required(atom()) => term()}

Callbacks

call_tool(term, t, map)

@callback call_tool(term(), String.t(), map()) :: {:ok, term()} | {:error, term()}

list_tools(term)

@callback list_tools(term()) :: {:ok, [tool()]} | {:error, term()}

Functions

call_tool(client, name, arguments)

@spec call_tool(term(), String.t(), map()) :: {:ok, term()} | {:error, term()}

create(opts \\ [])

@spec create(keyword() | map()) :: term()

Create a dependency-free MCP client transport config.

list_tools(client)

@spec list_tools(term()) :: {:ok, [tool()]} | {:error, term()}