ruvnet/ruflo · error
Tool not found
Error message
Tool not found: ${name} What it means
The v2-compatibility default mock service was asked for a tool by a name that is not in its v3-equivalent tools list. The mock only knows the tools mapped from v2, so any other tool name (typo or unmigrated v2 tool) produces this lookup failure in compatibility tests.
Solutions
- Register the tool before invoking it in the compatibility test.
- Check the tool name spelling against the registry.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at v3/@claude-flow/testing/src/v2-compat/compatibility-validator.ts:439 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18).
Data as JSON: /api/errors/fca395c0b9f39794.
Report an issue: GitHub.
Appendix: source
Thrown at v3/@claude-flow/testing/src/v2-compat/compatibility-validator.ts:439
];
const v3Hooks = V2_HOOKS.map(h => h.v3Equivalent || h.name);
const v3Classes = ['UnifiedSwarmCoordinator', 'UnifiedMemoryService', 'AgentLifecycleService', 'TaskExecutionService'];
return {
cli: {
execute: vi.fn().mockImplementation(async (command: string) => {
const isSupported = v3Commands.some(c => c === command || command.startsWith(c.split(' ')[0]));
return { success: isSupported, output: isSupported ? 'OK' : 'Command not found' };
}),
getCommands: vi.fn().mockReturnValue(v3Commands),
},
mcp: {
callTool: vi.fn().mockImplementation(async (name: string) => {
const v3Name = toolNameMapping[name] || name;
const isSupported = v3Tools.includes(v3Name);
if (!isSupported) throw new Error(`Tool not found: ${name}`);
return { success: true };
}),
getTools: vi.fn().mockReturnValue(v3Tools),
translateToolName: vi.fn().mockImplementation((v2Name: string) => toolNameMapping[v2Name] || v2Name),
},
hooks: {
trigger: vi.fn().mockImplementation(async (name: string) => {
const isSupported = v3Hooks.includes(name);
return { handled: isSupported, result: isSupported ? {} : null };
}),
getHooks: vi.fn().mockReturnValue(v3Hooks),
},
api: {
getClass: vi.fn().mockImplementation((name: string) => {
const mapping: Record<string, { methods: string[] }> = {
'UnifiedSwarmCoordinator': { methods: ['initialize', 'spawn', 'addAgent', 'removeAgent', 'broadcast', 'consensus', 'getStatus', 'shutdown'] },
'UnifiedMemoryService': { methods: ['store', 'search', 'delete', 'clear', 'getStats'] },
'AgentLifecycleService': { methods: ['spawn', 'terminate', 'list', 'getInfo', 'getStatus'] },View on GitHub (pinned to fa13ee4ad6)