# `Urchin.Tool`
[🔗](https://github.com/urth-inc/urchin/blob/v0.4.0/lib/urchin/tool.ex#L1)

A tool definition advertised via `tools/list`.

Mirrors the `Tool` type from the MCP schema. `input_schema` is a JSON Schema object
describing the tool arguments; when omitted it defaults to `default_input_schema/0`, an
object that accepts no properties.

# `t`

```elixir
@type t() :: %Urchin.Tool{
  annotations: map() | nil,
  description: String.t() | nil,
  execution: map() | nil,
  icons: [map()] | nil,
  input_schema: map() | nil,
  meta: map() | nil,
  name: String.t(),
  output_schema: map() | nil,
  title: String.t() | nil
}
```

# `default_input_schema`

```elixir
@spec default_input_schema() :: map()
```

The input schema advertised for a tool that declares none: an object accepting no
properties, per the MCP recommendation for parameterless tools.

# `new`

```elixir
@spec new(keyword() | map()) :: t()
```

Builds a tool from a keyword list or map of attributes.

# `to_map`

```elixir
@spec to_map(t()) :: map()
```

Serializes the tool to its JSON-RPC wire shape.

---

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