Skip to main content

with_extra_property

Function with_extra_property 

Source
pub fn with_extra_property(
    schema: &JsonObject,
    name: &str,
    fragment: Value,
) -> JsonObject
Expand description

Inject a property into a tool’s argument schema, returning a new schema.

Useful for “global” arguments your dispatcher injects into every tool (a background flag, a dry_run flag, …): the model sees one merged schema, and your dispatch wrapper strips the global out before building the SkillCtx. Idempotent for a given name — it overwrites that one property and leaves every skill-specific property alone. Creates the properties object if the schema doesn’t have one.