ConduitMcp.Discover (ConduitMCP v0.11.0)

Copy Markdown View Source

Builds the result of server/discover, the modern-era method a client uses to learn which protocol versions, capabilities and instructions a server has, without a handshake.

server/discover is era-exempt: it is served on the modern path even when the request carries no _meta (see ConduitMcp.Era), because a client may call it precisely to find out which era the server speaks. It is authenticated like every other POST.

The result body is:

ConduitMcp.Protocol.Modern adds resultType, the cache hints and the serverInfo _meta.

Summary

Functions

The server's instructions, or nil.

The server/discover result body for server_module on conn.

Functions

instructions(server_module, conn)

@spec instructions(module(), Plug.Conn.t() | map()) :: String.t() | nil

The server's instructions, or nil.

The transport's :instructions option (resolved into conn.private[:instructions]) wins; otherwise the server module's __instructions__/0, generated by use ConduitMcp.Server, instructions: and by use ConduitMcp.Endpoint, instructions:. Only a string counts. Used for both server/discover and the legacy initialize result.

result(server_module, conn)

@spec result(module(), Plug.Conn.t() | map()) :: map()

The server/discover result body for server_module on conn.