tools
Classes
ToolMeta
Bases: BaseModel
Metadata for a tool.
Attributes
manifest
Manifest of the tool, usually parsed from the tool's file frontmatter.
Dict Fields
version(str, optional): Version of the toolfunding_url(str, optional): URL for funding/supporting the toolicon_url(str, optional): URL for the tool's iconrequired_open_webui_version(str, optional): Minimum required Open WebUI version for this tool
ToolModel
Bases: BaseModel
Model representing a tool in the database.
- Code Reference routers tools Classes ToolsClient Functions
- Code Reference models tools Classes ToolUserModel
Attributes
specs
List of function specifications (JSON schema) for the tool's functions.
Dict Fields
name(str, required): Name of the functiondescription(str, optional): Description of what the function doesparameters(dict, required): Parameters schema for the functiontype(str, required): Should be "object"properties(dict, required): Dictionary of parameter definitions- Each property key is the parameter name
- Each property value is a parameter specification with:
type(str, required): Parameter type (e.g., "string", "number", "boolean", "array", "object")description(str, optional): Description of the parameterrequired(list[str], optional): List of required parameter names- Additional OpenAPI-style parameter constraints
required(list[str], optional): List of required parameter names
- Additional OpenAI function specification fields as needed
access_control
Access control settings for the tool.
Dict Fields
read(dict, optional): Read access permissionsgroup_ids(list[str], optional): List of group IDs that have read accessuser_ids(list[str], optional): List of user IDs that have read access
write(dict, optional): Write access permissionsgroup_ids(list[str], optional): List of group IDs that have write accessuser_ids(list[str], optional): List of user IDs that have write access
Special values
None: Public access, available to all users with the "user" role{}: Private access, restricted exclusively to the owner
ToolUserModel
ToolResponse
Bases: BaseModel
Response model for tool operations, excluding heavy content/specs.
- Code Reference routers tools Classes ToolsClient Functions create_new_tool
- Code Reference models tools Classes ToolUserResponse
Attributes
access_control
Access control settings for the tool.
Dict Fields
read(dict, optional): Read access permissionsgroup_ids(list[str], optional): List of group IDs that have read accessuser_ids(list[str], optional): List of user IDs that have read access
write(dict, optional): Write access permissionsgroup_ids(list[str], optional): List of group IDs that have write accessuser_ids(list[str], optional): List of user IDs that have write access
Special values
None: Public access, available to all users with the "user" role{}: Private access, restricted exclusively to the owner
ToolUserResponse
Bases: ToolResponse
Tool response including user details.
- Code Reference routers tools Classes ToolsClient Functions
Attributes
has_user_valves
Indicates if the tool has user-specific valves (settings).
ToolForm
Bases: BaseModel
Form for creating or updating a tool.
- Code Reference routers tools Classes ToolsClient Functions
Attributes
access_control
Access control settings for the tool.
Dict Fields
read(dict, optional): Read access permissionsgroup_ids(list[str], optional): List of group IDs that have read accessuser_ids(list[str], optional): List of user IDs that have read access
write(dict, optional): Write access permissionsgroup_ids(list[str], optional): List of group IDs that have write accessuser_ids(list[str], optional): List of user IDs that have write access
Special values
None: Public access, available to all users with the "user" role{}: Private access, restricted exclusively to the owner
ToolValves
Bases: BaseModel
Model representing tool valves (configuration settings).
Attributes
valves
Dictionary of valve values representing tool-specific configuration settings.
Dict Fields
- Arbitrary key-value pairs defined by each tool's
Valvesclass - Common examples from tool implementations:
priority(int, optional): Priority level for tool operationsmax_turns(int, optional): Maximum allowable conversation turnsOPENAI_API_BASE_URL(str, optional): Base URL for OpenAI API callsOPENAI_API_KEY(str, optional): API key for OpenAI services- Other tool-specific configuration parameters
Valves are tool-specific configuration settings that control the behavior of tools. Each tool can define its own Valves class with custom parameters. The valves dictionary contains the current configuration values for the tool.
Special behavior
None: No valves configured for this tool{}: Empty valves configuration (tool uses default settings)- When present: Contains the active configuration for the tool
Valves can be managed via the following endpoints
- GET
/tools/id/{id}/valves- Get current valves for a tool - POST
/tools/id/{id}/valves/update- Update valves for a tool - GET
/tools/id/{id}/valves/spec- Get the Valves schema definition for a tool
LoadUrlForm
Bases: BaseModel
Form for loading a tool from a URL.
- Code Reference routers tools Classes ToolsClient Functions load_tool_from_url