Upsert Tool

Create or update a tool

Headers

AuthorizationstringRequired

Header authentication of the form Bearer <token>

Request

This endpoint expects an object.
source_codestringRequired
The source code of the function.
descriptionstringOptional
The description of the tool.
tagslist of stringsOptional
Metadata tags.
source_typestringOptionalDefaults to python
The source type of the function.
json_schemaobjectOptional

The JSON schema of the function (auto-generated from source_code if not provided)

args_json_schemaobjectOptional
The args JSON schema of the function.
return_char_limitintegerOptionalDefaults to 6000
The maximum number of characters in the response.
pip_requirementslist of objectsOptional
Optional list of pip packages required by this tool.

Response

Successful Response
idstring or nullformat: "^tool-[a-fA-F0-9]{8}"

The human-friendly ID of the Tool

tool_typeenum or null
The type of the tool.
descriptionstring or null
The description of the tool.
source_typestring or null
The type of the source code.
namestring or null
The name of the function.
tagslist of strings or null
Metadata tags.
source_codestring or null
The source code of the function.
json_schemaobject or null
The JSON schema of the function.
args_json_schemaobject or null
The args JSON schema of the function.
return_char_limitinteger or nullDefaults to 6000
The maximum number of characters in the response.
pip_requirementslist of objects or null
Optional list of pip packages required by this tool.
created_by_idstring or null
The id of the user that made this Tool.
last_updated_by_idstring or null
The id of the user that made this Tool.
metadata_object or null
A dictionary of additional metadata for the tool.