POST
/
v1
/
tools
/
run

Headers

user_id
string | null

Body

application/json
source_code
string
required

The source code of the function.

args
string
required

The arguments to pass to the tool (as stringified JSON).

name
string | null

The name of the tool to run.

source_type
string | null

The type of the source code.

Response

200 - application/json

A message representing the return value of a function call (generated by Letta executing the requested function).

Attributes: function_return (str): The return value of the function status (Literal["success", "error"]): The status of the function call id (str): The ID of the message date (datetime): The date the message was created in ISO format function_call_id (str): A unique identifier for the function call that generated this message stdout (Optional[List(str)]): Captured stdout (e.g. prints, logs) from the function invocation stderr (Optional[List(str)]): Captured stderr from the function invocation

id
string
required
date
string
required
function_return
string
required
status
enum<string>
required
Available options:
success,
error
function_call_id
string
required
message_type
enum<string>
default: function_return
Available options:
function_return
stdout
string[] | null
stderr
string[] | null