Anubis.Protocol.Behaviour behaviour
(anubis_mcp v0.17.1)
Copy Markdown
Behaviour that each MCP protocol version module must implement.
Each protocol version (e.g., 2024-11-05, 2025-03-26, 2025-06-18) implements this behaviour to isolate version-specific logic. This makes it trivial to add support for new MCP spec versions without scattering conditionals across the codebase.
Version differences
- 2024-11-05: Initial spec, SSE transport, basic tools/resources/prompts
- 2025-03-26: Added Streamable HTTP, JSON-RPC batching, authorization framework, tool annotations
- 2025-06-18: Removed batching, added structured tool output, elicitation, resource_link type
Summary
Callbacks
All notification methods supported by this version.
Peri schema for validating notification params by method for this version.
Progress notification params schema for this version.
All request methods supported by this version.
Peri schema for validating request params by method for this version.
List of features/capabilities this protocol version supports.
Returns the version string this module implements (e.g., '2025-03-26').
Types
Callbacks
@callback notification_methods() :: [method()]
All notification methods supported by this version.
Peri schema for validating notification params by method for this version.
@callback progress_params_schema() :: map()
Progress notification params schema for this version.
@callback request_methods() :: [method()]
All request methods supported by this version.
Peri schema for validating request params by method for this version.
@callback supported_features() :: [feature()]
List of features/capabilities this protocol version supports.
@callback version() :: version()
Returns the version string this module implements (e.g., '2025-03-26').