package mcp-kit

All checked builds pass
  1. Overview
  2. Docs
OCaml library for building MCP servers

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ocaml-mcp-v0.2.0.tar.gz
sha256=43c8319a13be91e323ae952a71ab673533fb3295886029eed9d81e5828de5ef7

doc/src/mcp-kit.jsonschema-core/uri_util.ml.html

Source file uri_util.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
(** URI utilities for JSON Schema — RFC 3986 resolution. *)

let resolve ~base ref_ =
  Uri.resolve (Uri.scheme base |> Option.value ~default:"") base ref_

let normalize u =
  let scheme = Uri.scheme u |> Option.map String.lowercase_ascii in
  let host = Uri.host u |> Option.map String.lowercase_ascii in
  let u =
    match scheme with Some s -> Uri.with_scheme u (Some s) | None -> u
  in
  match host with Some h -> Uri.with_host u (Some h) | None -> u

let fragment u = Uri.fragment u
let without_fragment u = Uri.with_fragment u None