FastestMCP.Schema.Error exception (fastest_mcp v0.2.0)

Copy Markdown View Source

A bounded error returned while compiling or validating JSON Schema.

Validation errors contain paths and keyword messages, but never include the submitted value. This makes them suitable for returning to an MCP caller without echoing secrets from tool arguments or results.

Summary

Types

phase()

@type phase() :: :compile | :validation

t()

@type t() :: %FastestMCP.Schema.Error{
  __exception__: term(),
  digest: String.t() | nil,
  message: String.t(),
  phase: phase(),
  violations: [violation()]
}

violation()

@type violation() :: %{
  instance_path: String.t(),
  schema_path: String.t(),
  keyword: String.t(),
  message: String.t()
}