# `DDD.Params`
[🔗](https://github.com/blackuprise/vicander/blob/v0.1.1/lib/ddd/use_cases/params.ex#L1)

The declared input of a use case: the fields, descriptions and validation that
`DDD.Command` and `DDD.Query` share.

    command do
      description "Add an item to a todo list"

      field :list_id, :uuid, required: true, description: "The list to add to"
      field :title,   :string, required: true, description: "What needs doing"
      field :due_date, :date, description: "Optional; not in the past"
    end

A field is `field name, type, opts`. The type is any `DDD.Type`. Options: `required: true`,
`default: value` and `description: "..."`. `new/1` reports every missing required field and
every value of the wrong type at once, as a `DDD.Error` with a violation per field.

The declaration is also readable by tools: `__description__/0` and `__params__/0`
(`[{name, type, opts}]`), which is how the MCP server builds a tool's input schema.

# `description`
*macro* 

Describe the use case in a sentence.

# `field`
*macro* 

Declare a field: `field name, type, required: true, default: ..., description: "..."`.

---

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