Skip to main content

get_sorted_tool_schemas

Function
This function is defined in the base module.
Get tool schemas sorted by function name for deterministic ordering. This ensures tool schemas are always ordered consistently for prompt caching optimization.

Signature

Parameters

List[Any]
required
List of tool objects (BaseTool instances, callables, etc.)

Returns

List[Dict[str, Any]]
List of tool schemas sorted alphabetically by function name

Exceptions

If validation fails

Uses

  • validate_tool_schema_consistency

Source

View on GitHub

praisonaiagents/tools/base.py at line 575

Tools Concept

Create Custom Tools

Tool Development