MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / nearest_key

Function nearest_key

src/tool_command/args.rs:454–456  ·  view source on GitHub ↗

Nearest property name by edit distance, for did-you-mean suggestions.

(key: &str, props: &Map<String, Value>)

Source from the content-addressed store, hash-verified

452
453/// Nearest property name by edit distance, for did-you-mean suggestions.
454fn nearest_key(key: &str, props: &Map<String, Value>) -> Option<String> {
455 nearest_by_edit_distance(key, props.keys().cloned())
456}
457
458/// Nearest tool name (short form) for unknown-tool suggestions.
459pub(crate) fn nearest_tool_name(canonical: &str, defs: &[ToolDefinition]) -> Option<String> {

Callers 1

unknown_key_errorFunction · 0.85

Calls 1

nearest_by_edit_distanceFunction · 0.85

Tested by

no test coverage detected