(a: Tool, b: Tool)
| 360 | // MCP tools stay name-sorted behind them for deterministic prompt cache keys. |
| 361 | // uniqBy preserves insertion order, so built-ins win on name conflict. |
| 362 | const byName = (a: Tool, b: Tool) => a.name.localeCompare(b.name) |
| 363 | return uniqBy( |
| 364 | sortToolsByPolicy(builtInTools).concat(allowedMcpTools.sort(byName)), |
| 365 | 'name', |
nothing calls this directly
no outgoing calls
no test coverage detected