tools

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.

post/tools

Request

  • Base URL: https://api.humanloop.com/v5
  • URL: https://api.humanloop.com/v5/tools
  • Auth: API key in header X-API-KEY

Request body

pathstring

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.

idstring

ID for an existing Tool.

source_codestring

Code source of the Tool.

setup_valuesobject

Values needed to setup the Tool, defined in JSON Schema format: https://json-schema.org/

attributesobject

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'pinecone_search' | 'google' | 'mock' | 'snippet' | 'json_schema' | 'get_api_call' | 'python'

Type of tool.

version_namestring

Unique identifier for this Tool version. Each Tool can only have one version with a given name.

version_descriptionstring

Description of the Version.

Response

Successful Response

pathstring required

Path of the Tool, including the name, which is used as a unique identifier.

idstring required

Unique identifier for the Tool.

directory_idstring

ID of the directory that the file is in on Humanloop.

source_codestring

Code source of the Tool.

setup_valuesobject

Values needed to setup the Tool, defined in JSON Schema format: https://json-schema.org/

attributesobject

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'pinecone_search' | 'google' | 'mock' | 'snippet' | 'json_schema' | 'get_api_call' | 'python'

Type of tool.

version_namestring

Unique identifier for this Tool version. Each Tool can only have one version with a given name.

version_descriptionstring

Description of the Version.

namestring required

Name of the Tool, which is used as a unique identifier.

descriptionstring

Description of the Tool.

readmestring

Long description of the file.

tagsstring[]

List of tags associated with the file.

version_idstring required

Unique identifier for the specific Tool Version. If no query params provided, the default deployed Tool Version is returned.

type'tool'
created_atstring date-time required
updated_atstring date-time required
created_byunknown
last_used_atstring date-time required
version_logs_countinteger required

The number of logs that have been generated for this Tool Version

total_logs_countinteger required

The number of logs that have been generated across all Tool Versions

signaturestring

Signature of the Tool.

Changes

No recorded changes to this operation across all 1 revision of this API.