# `ToolCall.IR.Type`

A node in the value-domain tree.

`kind: :any` means "the library could not determine a domain" — usually an
unknown remote type. `kind: :unsupported` means "the domain is known but
JSON cannot express it" (functions, pids, refs). Emitters render both as
`%{}`; only `:unsupported` triggers a compile-time warning.

`format` is the JSON Schema format string and `transform` is the
`{module, function}` that runs after the wire value has been coerced. Both
are populated by a `ToolCall.TypeProvider`; a hand-built calendar node must
set them explicitly. `pattern` is the JSON Schema regex string and
`pattern_regex` is its compiled form, required by coercion. Use
`ToolCall.Typespec.validate_type!/1` to build a validated copy of a
hand-written type. `source` is provenance except for `:charlist`, which
still drives charlist conversion and its schema default.

# `kind`

```elixir
@type kind() ::
  :integer
  | :float
  | :number
  | :string
  | :boolean
  | :atom
  | :array
  | :object
  | :tuple
  | :enum
  | :union
  | :null
  | :any
  | :unsupported
```

# `t`

```elixir
@type t() :: %ToolCall.IR.Type{
  additional: term(),
  fields: term(),
  format: term(),
  items: term(),
  kind: term(),
  maximum: term(),
  minimum: term(),
  nullable: term(),
  pattern: term(),
  pattern_regex: term(),
  source: term(),
  transform: term(),
  values: term(),
  variants: term()
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
