# `ToolCall.TypeSource`

Internal contract for function-declaration sources.

A source loads its compile-time state once, then returns a `Declaration` for a
function name and arity. the builder consumes the declaration; wire
emitters never see a source-specific AST.

# `state`

```elixir
@type state() :: term()
```

# `fetch`

```elixir
@callback fetch(state(), atom(), non_neg_integer()) ::
  {:ok, ToolCall.TypeSource.Declaration.t()}
  | {:error, [ToolCall.Diagnostic.t()]}
```

# `load`

```elixir
@callback load(module(), Macro.Env.t()) :: state()
```

---

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