# `LlmCall.ToolSpec`
[🔗](https://github.com/gilbertwong96/llm_call/blob/main/lib/llm_call/tool_spec.ex#L1)

A tool the model may call.

`parameters` is a JSON Schema object, not a JSON string, and must already be
in the selected codec's dialect. The Gemini codec validates its OpenAPI subset
and returns a `:validation` error for constructs it cannot send, such as a
lowercase `type`, `additionalProperties`, `$ref`/`$defs`, `prefixItems`,
`oneOf`, `const`, `allOf` or `not`. `kind: :builtin` is for provider-defined
tools such as web search or code interpreter, whose native definition lives in
`provider_options`.

`strict` is optional and codec-specific. OpenAI's requirement that a strict
schema be closed cannot be checked from the rendered map, so a mismatch remains
a provider error; Gemini rejects `strict` because it has no per-tool flag.

# `kind`

```elixir
@type kind() :: :function | :builtin
```

# `t`

```elixir
@type t() :: %LlmCall.ToolSpec{
  description: String.t() | nil,
  kind: kind(),
  name: String.t() | nil,
  parameters: map() | nil,
  provider_options: map(),
  strict: boolean() | nil
}
```

---

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