Run Tool From Source

Attempt to build a tool from source, then run it on the provided arguments

Headers

AuthorizationstringRequired

Header authentication of the form Bearer <token>

Request

This endpoint expects an object.
source_codestringRequired
The source code of the function.
argsmap from strings to anyRequired
The arguments to pass to the tool.
env_varsmap from strings to stringsOptional
The environment variables to pass to the tool.
namestring or nullOptional
The name of the tool to run.
source_typestring or nullOptional
The type of the source code.
args_json_schemamap from strings to any or nullOptional
The args JSON schema of the function.
json_schemamap from strings to any or nullOptional

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

pip_requirementslist of objects or nullOptional
Optional list of pip packages required by this tool.

Response

Successful Response
idstring
datestringformat: "date-time"
tool_returnstring
statusenum
Allowed values:
tool_call_idstring
namestring or null
message_type"tool_return_message" or nullDefaults to tool_return_message
The type of the message.
otidstring or null
sender_idstring or null
step_idstring or null
is_errboolean or null
stdoutlist of strings or null
stderrlist of strings or null

Errors