validate_tool_schema_consistency
Function
This function is defined in the base module.Validate a list of tools for schema consistency with OpenAI format. This function ensures all tools in a list can be properly serialized and have consistent schema structures for use with LLM providers.
Signature
Parameters
List[Any]
required
List of tool objects to validate
bool
default:"False"
If True, return the list of built schemas instead of just a boolean, so callers can reuse them without rebuilding.
Returns
Any
True if all tools are valid and consistent (or the built schemas list
when
return_schemas is True)Exceptions
ToolValidationError
ToolValidationError
If validation fails
Uses
validate_toolToolValidationErrorjson.dumpsnames.add
Used By
Source
View on GitHub
praisonaiagents/tools/base.py at line 516
