Current section
Files
Jump to
Current section
Files
lib/ccxt/mcp.ex
defmodule CCXT.MCP do
@moduledoc """
MCP tool definitions for the CCXT API.
Generates Model Context Protocol tool definitions from Descripex-annotated
functions on the `CCXT` module. Includes the `exchange/2` constructor and
all 241 unified methods plus the `exchange/2` constructor — each becomes a discoverable MCP tool with typed
input schema derived from `api()` param declarations.
tools = CCXT.MCP.tools()
# => [%{name: "ccxt__fetch_ticker", description: "...", inputSchema: %{...}}, ...]
"""
@modules [CCXT]
@doc "Generate MCP tool definitions for all api()-annotated functions on the CCXT module."
@spec tools(keyword()) :: [map()]
def tools(opts \\ []), do: Descripex.MCP.tools(@modules, opts)
end