Argmend
Argmend repairs broken tool-call arguments into JSON.
Install
[]
= "0.2"
Rust 1.95 or newer. The crate has no command-line program. Call it from your host.
Repair one argument string
use ;
That program is examples/repair.rs. Run it with:
cargo run --example repair
Valid means the text parsed and Argmend did not rewrite it. Repaired means Argmend rewrote the text and then parsed it. A Windows path whose backslash was a JSON escape is one of those rewrites. Unfixable means Argmend could not produce one JSON value. Ambiguous means more than one repair was possible, so none was chosen.
Pass a tool schema with repair_args when you have one. Blank input becomes {}, [], or null, matching the schema type. A string, number, or boolean is not invented.
What success does not mean
Ok from repair_args means Argmend produced JSON. It does not mean the schema accepts that JSON. Validate the value before you run the tool.
$ref and $dynamicRef are not resolved. pattern, format, and the content keywords are not evaluated. A value that already fails those stays in place when nothing else was rewritten.
Contributing
See CONTRIBUTING.md. Security reports go to SECURITY.md. Questions go to SUPPORT.md.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE)
at your option.