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/error.ml.html

Source file error.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
(** Validation error types. *)

type t = {
  instance_path : Json_pointer.t;
  schema_path : Json_pointer.t;
  keyword : string;
  message : string;
  context : t list;
}

let make ~instance_path ~schema_path ~keyword message =
  { instance_path; schema_path; keyword; message; context = [] }

let make_with_context ~instance_path ~schema_path ~keyword ~context message =
  { instance_path; schema_path; keyword; message; context }

let to_string e =
  Printf.sprintf "%s: %s (keyword: %s, schema: %s)"
    (Json_pointer.to_string e.instance_path)
    e.message e.keyword
    (Json_pointer.to_string e.schema_path)