continuedev/continue · error · Error
Tool ${toolName} not found
Error message
Tool ${toolName} not found What it means
After config loads successfully, the preprocessArgs handler looks up the tool by function.name; if no configured tool matches toolName it throws `Tool ${toolName} not found`.
Source
Thrown at core/core.ts:1090
basePolicy,
parsedArgs,
processedArgs,
);
return { policy: evaluatedPolicy, displayValue };
}
return { policy: basePolicy, displayValue };
},
);
on("tools/preprocessArgs", async ({ data: { toolName, args } }) => {
const { config } = await this.configHandler.loadConfig();
if (!config) {
throw new Error("Config not loaded");
}
const tool = config?.tools.find((t) => t.function.name === toolName);
if (!tool) {
throw new Error(`Tool ${toolName} not found`);
}
try {
const preprocessedArgs = await tool.preprocessArgs?.(args, {
ide: this.ide,
});
return {
preprocessedArgs,
};
} catch (e) {
let errorReason =
e instanceof ContinueError ? e.reason : ContinueErrorReason.Unknown;
let errorMessage =
e instanceof Error
? e.message
: `Error preprocessing tool call args for ${toolName}\n${JSON.stringify(args)}`;
return {
preprocessedArgs: undefined,View on GitHub (pinned to 5522c6f44c)
Solutions
- Verify the exact function.name in config.tools matches toolName
- Register the custom tool in config before calling
- Check for typos/casing in the tool name
Example fix
// before
preprocessArgs({ toolName: "read_file", args });
// after
preprocessArgs({ toolName: "readfile", args }); // must equal t.function.name in config Defensive patterns
Strategy: validation
Validate before calling
const names = new Set(config.tools.map(t => t.function.name));
if (!names.has(toolName)) throw new RangeError(`unknown tool ${toolName}`); Type guard
const isKnownTool = (n: string, c: Config) => c.tools.some(t => t.function.name === n);
Try / catch
catch (e) { if (e.message.endsWith('not found')) { logMisconfiguredTool(e.message); } } Prevention
- Derive tool name constants from config at startup
When it happens
Trigger: Calling preprocessArgs with a toolName that isn't in config.tools (typo, unregistered custom tool, tool removed from config).
Common situations: Custom tool not registered in config; renaming a tool; stale tool name from an old session.
Related errors
- Config not loaded
- Tool ${toolCall.function.name} not found
- Profile ${profileId} not found
- No reranker set up
- No chat model selected
AI-assisted analysis of continuedev/continue@5522c6f44c (2026-08-27).
Data as JSON: /api/errors/b8814ca42d2a6dbf.
Report an issue: GitHub.