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.
argsobjectRequired
The arguments to pass to the tool.
env_varsmap from strings to stringsOptional
The environment variables to pass to the tool.
namestringOptional
The name of the tool to run.
source_typestringOptional
The type of the source code.
args_json_schemaobjectOptional
The args JSON schema of the function.
json_schemaobjectOptional

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

pip_requirementslist of objectsOptional
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
stdoutlist of strings or null
stderrlist of strings or null