SchemaGeneratorInterface
Provides JSON Schema generation for reflected elements.
Tags
Table of Contents
Methods
-
generate()
: array{type: "object", properties: array
|object, required?: string[]} - Generates a JSON Schema for input parameters.
- generateOutputSchema() : array<string, mixed>|null
- Generates a JSON Schema for output/result.
Methods
generate()
Generates a JSON Schema for input parameters.
public
generate(Reflector $reflection) : array{type: "object", properties: array|object, required?: string[]}
The returned schema must be a valid JSON Schema object (type: 'object') with properties corresponding to a tool's parameters.
Parameters
- $reflection : Reflector
Return values
array{type: "object", properties: arraygenerateOutputSchema()
Generates a JSON Schema for output/result.
public
generateOutputSchema(Reflector $reflection) : array<string, mixed>|null
Parameters
- $reflection : Reflector