ToolReturnMessage
A message representing the return value of a tool call (generated by Letta executing the requested tool). Args: id (str): The ID of the message date (datetime): The date the message was created in ISO format name (Optional[str]): The name of the sender of the message tool_return (str): The return value of the tool (deprecated, use tool_returns) status (Literal["success", "error"]): The status of the tool call (deprecated, use tool_returns) tool_call_id (str): A unique identifier for the tool call that generated this message (deprecated, use tool_returns) stdout (Optional[List(str)]): Captured stdout (e.g. prints, logs) from the tool invocation (deprecated, use tool_returns) stderr (Optional[List(str)]): Captured stderr from the tool invocation (deprecated, use tool_returns) tool_returns (Optional[List[ToolReturn]]): List of tool returns for multi-tool support
AIAgentsStateful AgentsMemoryMemGPTContinual LearningMCPMulti-AgentRAGOpen Source
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/ToolReturnMessage",
"title": "ToolReturnMessage",
"properties": {
"id": {
"type": "string",
"title": "Id"
},
"date": {
"type": "string",
"format": "date-time",
"title": "Date"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Name"
},
"message_type": {
"type": "string",
"const": "tool_return_message",
"title": "Message Type",
"description": "The type of the message.",
"default": "tool_return_message"
},
"otid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Otid",
"description": "The offline threading id (OTID). Set by the client to deduplicate requests. Used for idempotency in background streaming mode \u2014 each message in a request must have a unique OTID. Retries of the same request should reuse the same OTIDs."
},
"sender_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Sender Id"
},
"step_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Step Id"
},
"is_err": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Is Err"
},
"seq_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Seq Id"
},
"run_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Run Id"
},
"tool_return": {
"type": "string",
"title": "Tool Return",
"deprecated": true
},
"status": {
"type": "string",
"enum": [
"success",
"error"
],
"title": "Status",
"deprecated": true
},
"tool_call_id": {
"type": "string",
"title": "Tool Call Id",
"deprecated": true
},
"stdout": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Stdout",
"deprecated": true
},
"stderr": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Stderr",
"deprecated": true
},
"tool_returns": {
"anyOf": [
{
"items": {
"$ref": "#/components/schemas/letta__schemas__letta_message__ToolReturn"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Tool Returns"
}
},
"type": "object",
"required": [
"id",
"date",
"tool_return",
"status",
"tool_call_id"
],
"description": "A message representing the return value of a tool call (generated by Letta executing the requested tool).\n\nArgs:\n id (str): The ID of the message\n date (datetime): The date the message was created in ISO format\n name (Optional[str]): The name of the sender of the message\n tool_return (str): The return value of the tool (deprecated, use tool_returns)\n status (Literal[\"success\", \"error\"]): The status of the tool call (deprecated, use tool_returns)\n tool_call_id (str): A unique identifier for the tool call that generated this message (deprecated, use tool_returns)\n stdout (Optional[List(str)]): Captured stdout (e.g. prints, logs) from the tool invocation (deprecated, use tool_returns)\n stderr (Optional[List(str)]): Captured stderr from the tool invocation (deprecated, use tool_returns)\n tool_returns (Optional[List[ToolReturn]]): List of tool returns for multi-tool support"
}