Agent / Tools from a state machine's transitions

What the assistant is shown

Every protocol adapter hands the assistant the same parameter schema. For withdraw it is:

json
{
  "type": "object",
  "properties": {
    "amount": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "exclusiveMinimum": 0,
      "x-metakit-domain": { "kind": "money", "currency": "USD", "scale": 2 }
    }
  },
  "required": ["amount"],
  "additionalProperties": false
}

Effect derives the JSON Schema of a Schema on its own, but it cannot read metakit rules. So exclusiveMinimum is added from the Expr.refine rule, and x-metakit-domain (a metakit extension keyword naming the amount's currency and its scale, the number of decimal places stored) from Money. The rest is Effect's: minimum and maximum are the safe-integer range every Schema.Int has. When Effect and metakit both give the same keyword, the tighter value is kept.