Raxol.AgentClientProtocol.Schema.AgentTypes.McpServer (Raxol Agent Client Protocol v0.1.0)

Copy Markdown View Source

A client-provided MCP server descriptor: tagged union of http, sse (both discriminated by a "type" wire field), and the untagged stdio fallback.

Ported from the MIT f1729/agent_client_protocol (c) 2025 f1729; see NOTICE.md.

Summary

Functions

Total: never raises. Dispatches on "type" for the http/sse tagged variants; anything else (including a bare map with no "type" at all) is attempted as the untagged stdio variant, matching the wire spec (type is stripped before delegating so it never leaks into the sub-struct's _meta).

Types

Functions

from_json(map)

@spec from_json(term()) :: {:ok, t()} | {:error, term()}

Total: never raises. Dispatches on "type" for the http/sse tagged variants; anything else (including a bare map with no "type" at all) is attempted as the untagged stdio variant, matching the wire spec (type is stripped before delegating so it never leaks into the sub-struct's _meta).

to_json(arg)

@spec to_json(t()) :: map()