# `DDD.MCP.Args`
[🔗](https://github.com/blackuprise/vicander/blob/v0.1.1/lib/ddd/mcp/args.ex#L1)

Turns the JSON arguments of a tool call into the typed attributes of a command or query.

Strings become dates, decimals, enum atoms and so on through `DDD.Type`. Nested entities and
value objects are built with their own `new/1`, so their rules run: a client can never hand
the application a nested struct that skipped validation. Atoms are never created from input.

# `cast`

```elixir
@spec cast(module(), map()) :: {:ok, map()} | {:error, DDD.Error.t()}
```

Cast the string-keyed `args` for the parameters of `module` (a command or query).

Returns `{:ok, attrs}` or `{:error, %DDD.Error{}}` listing every argument that could not be
converted. A `null` argument counts as absent.

# `from_string`

```elixir
@spec from_string(DDD.Type.t(), String.t()) :: {:ok, term()} | :error
```

Cast one value of a URI (always a string) to the field type: `"5"` for an integer field,
`"2030-01-02"` for a date.

---

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