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)

Response

Successful Response

idstring
datestringformat: "date-time"
tool_returnstring
statusenum
Allowed values:
tool_call_idstring
namestringOptional
message_type"tool_return_message"OptionalDefaults to tool_return_message

The type of the message.

otidstringOptional
sender_idstringOptional
step_idstringOptional
stdoutlist of stringsOptional
stderrlist of stringsOptional