Raxol.Agent.McpClient (Raxol Agent v2.6.0)

Copy Markdown View Source

MCP client for consuming external tool servers.

This module delegates to Raxol.MCP.Client. Use Raxol.MCP.Client directly for new code.

Summary

Functions

Parse a namespaced tool name. Delegates to Raxol.MCP.Client.parse_tool_name/1.

Start an MCP client. Delegates to Raxol.MCP.Client.start_link/1.

Get client status. Delegates to Raxol.MCP.Client.status/1.

Stop the client. Delegates to Raxol.MCP.Client.stop/1.

Build a namespaced tool name. Delegates to Raxol.MCP.Client.tool_name/2.

Types

call_result()

@type call_result() :: Raxol.MCP.Client.call_result()

tool()

@type tool() :: Raxol.MCP.Client.tool()

Functions

call_tool(server, tool_name, arguments \\ %{})

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

Call a tool. Delegates to Raxol.MCP.Client.call_tool/3.

list_tools(server)

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

List tools. Delegates to Raxol.MCP.Client.list_tools/1.

parse_tool_name(name)

@spec parse_tool_name(String.t()) :: {:ok, {String.t(), String.t()}} | :error

Parse a namespaced tool name. Delegates to Raxol.MCP.Client.parse_tool_name/1.

start_link(opts)

@spec start_link(keyword()) :: GenServer.on_start()

Start an MCP client. Delegates to Raxol.MCP.Client.start_link/1.

status(server)

@spec status(GenServer.server()) :: map()

Get client status. Delegates to Raxol.MCP.Client.status/1.

stop(server)

@spec stop(GenServer.server()) :: :ok

Stop the client. Delegates to Raxol.MCP.Client.stop/1.

tool_name(server_name, tool)

@spec tool_name(atom(), String.t()) :: String.t()

Build a namespaced tool name. Delegates to Raxol.MCP.Client.tool_name/2.