Model Context Protocol in OCaml

fix

Changed files
-12
lib
-12
lib/mcp_sdk.mli
···
(** Default capabilities for the server *)
val default_capabilities : ?with_tools:bool -> ?with_resources:bool -> ?with_prompts:bool -> unit -> Json.t
-
(** Register a tool with the server *)
-
val register_tool : server -> Tool.t -> Tool.t
-
(** Create and register a tool in one step *)
val add_tool : server -> name:string -> ?description:string -> ?schema_properties:(string * string * string) list -> ?schema_required:string list -> (Json.t -> Json.t) -> Tool.t
-
-
(** Register a resource with the server *)
-
val register_resource : server -> Resource.t -> Resource.t
(** Create and register a resource in one step *)
val add_resource : server -> uri_template:string -> ?description:string -> ?mime_type:string -> (string list -> string) -> Resource.t
-
(** Register a prompt with the server *)
-
val register_prompt : server -> Prompt.t -> Prompt.t
-
(** Create and register a prompt in one step *)
val add_prompt : server -> name:string -> ?description:string -> ?arguments:(string * string option * bool) list -> ((string * string) list -> Prompt.message list) -> Prompt.t
-
-
(** Set server capabilities *)
-
val set_capabilities : server -> Json.t -> unit
(** Configure server with default capabilities based on registered components *)
val configure_server : server -> ?with_tools:bool -> ?with_resources:bool -> ?with_prompts:bool -> unit -> server