Skip to main content

minify_tool_schema

Function minify_tool_schema 

Source
pub fn minify_tool_schema(
    description: &str,
    parameters: &Value,
    tier: SchemaTier,
) -> (String, Value)
Expand description

Apply tier to a tool’s advertised description/parameters, returning the (possibly) minified pair. Deterministic and LLM-free: the same inputs always produce the same output.

Per-tool byte floor: if the minified wire form (description + serialized parameters) is not smaller than the original, the original is returned unchanged — a tool that’s already terse is advertised as-is at any tier, never bloated by the transform.