# `ExMCP.Testing.SchemaGenerator`
[🔗](https://github.com/azmaveth/ex_mcp/blob/v1.0.0/lib/ex_mcp/testing/schema_generator.ex#L1)

Generates valid test values from JSON Schema definitions.

Useful for conformance testing, property-based testing, and automated
tool exploration. Given a JSON Schema `inputSchema`, produces minimal
valid arguments that satisfy the schema constraints.

## Examples

    iex> schema = %{"type" => "object", "properties" => %{
    ...>   "name" => %{"type" => "string"},
    ...>   "age" => %{"type" => "integer"}
    ...> }, "required" => ["name"]}
    iex> ExMCP.Testing.SchemaGenerator.generate_args(schema)
    %{"name" => "test", "age" => 1}

# `generate_args`

```elixir
@spec generate_args(map() | nil) :: map()
```

Generate a map of arguments from a JSON Schema object definition.

Returns a map with generated values for all properties. Required
properties always get values; optional properties get values too
(conformance tests may validate them).

# `generate_value`

```elixir
@spec generate_value(map() | nil) :: term()
```

Generate a single value from a JSON Schema type definition.

---

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