Skip to main content

native_name

Function native_name 

Source
pub fn native_name(category: ToolCategory, args: &Value) -> Option<&'static str>
Expand description

Reverse of classify_tool: pick Pi’s preferred native tool name for a generic ToolCategory, disambiguating by call args when multiple Pi tools share the same category.

Used by crate::project::PiProjector when projecting tool calls from foreign harnesses (Claude, Gemini, etc.) — we know the category from the source’s classifier and need to pick a Pi name whose arg shape matches the call’s actual args. Returns None for categories with no obvious Pi analog.