Quick Start
1
Get a suggestion
2
Fail fast in CI
3
Route suggestions yourself
How It Works
Every tool name passes throughresolve_tool_names, which looks it up, and on a miss computes the closest known names.
Suggestions use
difflib.get_close_matches with a cutoff of 0.6 and up to 3 names per unknown tool.get_registry().list_tools()), the built-in TOOL_MAPPINGS keys, and praisonai_tools.__all__ when the extra is installed.
Accepted tool shapes
Atools=[...] element can now be a plain function, a callable class instance, or a BaseTool-style instance.
BaseTool-style instances — anything exposing a
.name attribute and a .run method, such as ClarifyTool — are accepted alongside plain functions and callable classes. When a callable tool also carries a .name attribute, .name wins over __name__.
Choosing a Mode
Pick the behaviour that matches where your agent runs.Configuring Strict Mode
Turn strict mode on with an environment variable, a keyword argument, or a callback.- Environment variable
- Argument
- Callback
strict is left unset:
The ToolResolutionError Shape
Strict mode raises ToolResolutionError, carrying the unknown names and their suggestions.
ToolResolutionError subclasses ValueError, so existing except ValueError: blocks still catch it.
Strict mode also applies to
Agent(toolsets=[...]) — the toolset code path re-raises ToolResolutionError intact, preserving .unknown and .suggestions.Common Patterns
Break the build on a typo in CI, then keep exploration friendly locally.Best Practices
Turn on strict mode in CI
Turn on strict mode in CI
Add
PRAISONAI_STRICT_TOOLS=true to your CI environment so a mistyped tool name breaks the build instead of quietly shipping a tool-less agent.Keep warn-and-continue for exploration
Keep warn-and-continue for exploration
Interactive exploration works better with the default — you get the “did you mean …?” hint without losing the running session.
Route suggestions through your own stack
Route suggestions through your own stack
For long-running services,
on_unknown sends the suggestion through the logger or alerting your app already uses.Install praisonai-tools for richer suggestions
Install praisonai-tools for richer suggestions
The suggestion catalogue unions the registry,
TOOL_MAPPINGS, and praisonai_tools.__all__. Installing praisonai-tools broadens the pool suggestions come from.Related
Allowed Tools
Restrict which tools an agent can call.
Tool Resolver
How tool names map to callables across sources.
Tool Call Self-Repair
Runtime auto-fix when the LLM emits a drifted tool name during a run.

