Phantom.ResourceTemplate (phantom_mcp v0.2.0)
View SourceThe Model Context Protocol (MCP) provides a standardized way for servers to expose resources to clients. Resources allow servers to share data that provides context to language models, such as files, database schemas, or application-specific information. Each resource is uniquely identified by a URI.
https://modelcontextprotocol.io/specification/2025-03-26/server/resources
Summary
Functions
Build a resource_template spec
Represent a ResourceTemplate spec as json when listing the available resources to clients.
Types
@type json() :: %{ :uri => String.t(), :name => String.t(), optional(:description) => String.t(), optional(:mimeType) => String.t(), optional(:size) => pos_integer() }
@type t() :: %Phantom.ResourceTemplate{ completion_function: atom(), description: String.t(), function: atom(), handler: module(), meta: map(), mime_type: String.t(), name: String.t(), path: String.t(), router: module(), scheme: String.t(), size: pos_integer(), uri: URI.t(), uri_template: String.t() }