enum-canonicalize
Map free-text values onto a closed set of allowed values, or abstain — Maps each input string onto one member of a closed caller-supplied set using, in order: exact match, caller aliases, a deterministic normal form (Unicode NFKC, case and accent folding, punctuation and underscore collapse), then bounded edit distance (optimal string alignment, so a swapped pair of letters costs 1). Returns the canonical value, the method, the distance and the nearest candidates; it
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"values": "<values>",
"allowed": "<allowed>"
},
"name": "enum-canonicalize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| values | Yes | Strings to canonicalize. | |
| aliases | No | Caller synonyms; each canonical must be in allowed. | |
| allowed | Yes | The closed set of canonical values. | |
| maxDistance | No | Largest edit distance accepted (default 2). The effective limit is also capped at one third of the normalized input length. | |
| caseSensitive | No | Skip case, accent and punctuation folding (only NFKC and whitespace collapse). Default false. |