Param
Describes a tool method parameter. Used to generate JSON schema automatically.
Param::__construct()
public function __construct(string $description = '', ?mixed $default = null, ?array $clamp = null, ?array $enum = null, bool $required = false, ?string $type = null, ?array $properties = null, ?array $requiredProperties = null):Parameters
| Name | Type | Description |
|---|---|---|
| $description | string | |
| $default | ?mixed | |
| $clamp | (list<(int | float)> | null) | |
| $enum | (list<mixed> | null) | |
| $required | bool | |
| $type | (string | null) | JSON-Schema `type` override for this parameter (e.g. `'object'`). When omitted, the type is inferred from the PHP parameter's native type exactly as before (tool-runtime 0.6, additive). |
| $properties | (array<string, mixed> | null) | Nested JSON-Schema `properties` map, meaningful when `type` is `'object'`. Omitted entirely from the generated schema when `null` (an open object with no declared shape). |
| $requiredProperties | (list<string> | null) | Nested JSON-Schema `required` list for the object's own `properties` (sibling of `properties`, not to be confused with `$required` below, which marks the parameter ITSELF required in the outer schema). |