ExMCP.Types (ex_mcp v0.1.0)
View SourceType definitions for the Model Context Protocol.
This module defines the core types used throughout ExMCP, matching the MCP specification.
Summary
Types
@type content_part() :: text_content() | image_content() | resource_ref()
@type error_code() :: -32700..-32600 | -32099..-32000
@type initialize_result() :: %{ protocolVersion: String.t(), serverInfo: server_info(), capabilities: capabilities() }
@type json_schema() :: map()
@type log_level() :: :debug | :info | :warning | :error
@type prompt() :: %{ :name => String.t(), optional(:description) => String.t(), optional(:arguments) => [prompt_argument()] }
@type prompt_content() :: String.t() | [content_part()]
@type prompt_message() :: %{role: String.t(), content: prompt_content()}
@type resource_ref() :: %{type: String.t(), resource: resource_content()}
@type tool() :: %{ :name => String.t(), :description => String.t(), optional(:input_schema) => json_schema() }
@type tool_result() :: [content_part()] | {:error, String.t()}
@type transport() :: :stdio | :sse | :websocket | module()