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 tool_category: pick Gemini’s preferred native tool name for a generic ToolCategory, using the call’s args to disambiguate when multiple Gemini tools share the same category.

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