pub struct Descriptor { /* private fields */ }Expand description
An owned, provider-neutral model descriptor.
Descriptor::input_schema is a Payload — uninterpreted owned bytes —
and it is the per-tool channel a composition layer constrains sampling
through. Core never parses it, so a strict JSON schema, a grammar, or a
provider-specific envelope around either are all expressible here, and the
adapter that writes the bytes is the same one that reads them. This is why
crate::runtime::model::SamplingParams::output_schema being request-level
is not a gap: the tool-level placement already exists, one level down.
Implementations§
Source§impl Descriptor
impl Descriptor
Sourcepub const fn new(name: Name, description: String, input_schema: Payload) -> Self
pub const fn new(name: Name, description: String, input_schema: Payload) -> Self
Creates a descriptor from owned fields.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Returns the model-facing description.
Sourcepub const fn input_schema(&self) -> &Payload
pub const fn input_schema(&self) -> &Payload
Returns the provider-neutral input schema.
Core assigns these bytes no meaning; they reach the provider unchanged as
ClientTool::input_schema.