Packages

Elixir library to connect LLMs to MCP servers for tool use capabilities

Current section

Files

Jump to
mcpixir lib mcpixir agents base.ex
Raw

lib/mcpixir/agents/base.ex

defmodule Mcpixir.Agents.Base do
@moduledoc """
Base behaviour for MCP agents.
"""
@callback new(map()) :: {:ok, map()}
@callback prepare(map()) :: {:ok, map()} | {:error, any()}
@callback run(map(), String.t()) :: {:ok, String.t(), map()}
@callback run_tool(map(), String.t(), map()) :: {:ok, any()} | {:error, any()}
end