adk_mcp_protocol_limits (erlang_adk v0.10.0)

View Source

Strict, bounded JSON validation for MCP protocol foundations.

This boundary accepts JSON values only: UTF-8 binary strings and keys, finite numbers, booleans, null, proper lists, and maps. It deliberately does not normalize atoms, tuples, pids, references, or functions because doing so at a wire boundary can turn internal terms into protocol data.

Summary

Functions

defaults()

-spec defaults() -> map().

encoded_bytes(Value)

-spec encoded_bytes(term()) -> {ok, non_neg_integer()} | {error, term()}.

encoded_bytes(Value, Overrides)

-spec encoded_bytes(term(), map()) -> {ok, non_neg_integer()} | {error, term()}.

validate_json(Value)

-spec validate_json(term()) -> {ok, term()} | {error, term()}.

validate_json(Value, Overrides)

-spec validate_json(term(), map()) -> {ok, term()} | {error, term()}.