Upsert Tool
Create a Tool or update it with a new version if it already exists.
Tools are identified by the `ID` or their `path`. The name, description and parameters determine the versions of the Tool.
You can provide `version_name` and `version_description` to identify and describe your versions.
Version names must be unique within a Tool - attempting to create a version with a name
that already exists will result in a 409 Conflict error.
Authentication
X-API-KEYstring
API Key authentication via header
Request
This endpoint expects an object.
path
Path of the Tool, including the name. This locates the Tool in the Humanloop filesystem and is used as as a unique identifier. For example: folder/name or just name.
id
ID for an existing Tool.
function
Callable function specification of the Tool shown to the model for tool calling.
source_code
Code source of the Tool.
setup_values
Values needed to setup the Tool, defined in JSON Schema format: https://json-schema.org/
attributes
Additional fields to describe the Tool. Helpful to separate Tool versions from each other with details on how they were created or used.
tool_type
Type of Tool.
version_name
Unique identifier for this Tool version. Each Tool can only have one version with a given name.
version_description
Description of the Version.
Response
Successful Response
Errors
422
Upsert Tools Post Request Unprocessable Entity Error