Skip to main content

llm_name

Function llm_name 

Source
pub fn llm_name(contract_id: &str) -> String
Expand description

LLM-facing tool name = <area>_<leaf> of a contract_id, where <area> is the segment immediately before the leaf. Examples: robonix/primitive/camera/snapshotcamera_snapshot robonix/primitive/lidar/snapshotlidar_snapshot robonix/primitive/chassis/movechassis_move robonix/service/memory/searchmemory_search robonix/service/navigation/navigatenavigation_navigate

Plain leaf-only used to be enough but multiple providers share leaves (snapshot on camera AND lidar). The OpenAI tool-list collapses duplicates and the LLM picks the wrong one. Prefixing with the area segment disambiguates while staying short and human-readable.

Executor still routes via the full contract_id (the leaf is the MCP-server-side tool name, which is unique within a single driver’s FastMCP server). This function only renames at the LLM-↔-pilot boundary.