Expand description
Argmend repairs broken tool-call arguments into JSON.
The crate does not know about Bline errors, chat requests, or the tool catalog. Callers pass the raw argument string and, when they have it, the tool’s JSON schema.
repair_args and normalize produce JSON. A successful result is
not a promise that the schema accepts it. The host still validates
before it runs a tool.
Structs§
- Repair
Request - Arguments plus an optional JSON schema.
- Repaired
- A value the host can execute, with every rewrite that produced it.
- Rewrite
- One recorded rewrite. Valid JSON that needs no schema change has none.
Enums§
- Repair
Error - Repair refused.
RepairError::Ambiguousis not a guess. - Repair
Outcome - Result of
repair_json. - Rewrite
Kind - Why a rewrite was applied.
Functions§
- normalize
- Apply a tool schema to an already-parsed value.
- repair_
args - Parse
raw, then applynormalizewhen a schema is present. - repair_
json - Syntax repair only. Empty input and garbage stay
RepairOutcome::Unfixable.