Skip to main content

Crate argmend

Crate argmend 

Source
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§

RepairRequest
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§

RepairError
Repair refused. RepairError::Ambiguous is not a guess.
RepairOutcome
Result of repair_json.
RewriteKind
Why a rewrite was applied.

Functions§

normalize
Apply a tool schema to an already-parsed value.
repair_args
Parse raw, then apply normalize when a schema is present.
repair_json
Syntax repair only. Empty input and garbage stay RepairOutcome::Unfixable.