adk_mcp_protocol_modern (erlang_adk v0.10.0)
View SourceMCP 2026-07-28 stateless protocol foundations.
The module is transport-independent except for validation and construction of the required Streamable HTTP metadata headers. It does not retain a protocol session and it does not implement the removed GET/SSE or replay mechanisms.
Summary
Functions
Construct a bounded MRTR input_required result. Modern foundations intentionally permit elicitation only; deprecated roots and sampling remain available solely through the legacy capability codec.
Attach responses to an original request for a stateless MRTR retry. The response keys must exactly match the server-issued input request keys.
Construct one self-describing modern JSON-RPC request and its mirrored HTTP headers. ClientContext accepts client_info, client_capabilities, and an optional map of non-reserved metadata.
Validate required modern Streamable HTTP headers against the body. Header names are case-insensitive; header values are case-sensitive.
Functions
Construct a bounded MRTR input_required result. Modern foundations intentionally permit elicitation only; deprecated roots and sampling remain available solely through the legacy capability codec.
-spec input_response_params(map(), map(), map(), undefined | binary()) -> {ok, map()} | {error, term()}.
Attach responses to an original request for a stateless MRTR retry. The response keys must exactly match the server-issued input request keys.
-spec request(binary() | integer(), binary(), map(), map()) -> {ok, #{message := map(), headers := map()}} | {error, term()}.
Construct one self-describing modern JSON-RPC request and its mirrored HTTP headers. ClientContext accepts client_info, client_capabilities, and an optional map of non-reserved metadata.
-spec validate_http_request(map() | [{binary(), binary()}], term()) -> {ok, map()} | {error, term()}.
Validate required modern Streamable HTTP headers against the body. Header names are case-insensitive; header values are case-sensitive.
-spec version() -> binary().