Skip to content
  • Auto
  • Light
  • Dark
DiscordForumGitHubSign up
View as Markdown
Copy Markdown

Open in Claude
Open in ChatGPT

Tools

Delete Tool
delete/v1/tools/{tool_id}
Retrieve Tool
get/v1/tools/{tool_id}
Modify Tool
patch/v1/tools/{tool_id}
List Tools
get/v1/tools/
Create Tool
post/v1/tools/
Upsert Tool
put/v1/tools/
Upsert Base Tools
post/v1/tools/add-base-tools
ModelsExpand Collapse
NpmRequirement = object { name, version }
name: string

Name of the npm package.

minLength1
version: optional string

Optional version of the package, following semantic versioning.

PipRequirement = object { name, version }
name: string

Name of the pip package.

minLength1
version: optional string

Optional version of the package, following semantic versioning.

Tool = object { id, args_json_schema, created_by_id, 14 more }

Representation of a tool, which is a function that can be called by the agent.

id: string

The human-friendly ID of the Tool

args_json_schema: optional map[unknown]

The args JSON schema of the function.

created_by_id: optional string

The id of the user that made this Tool.

default_requires_approval: optional boolean

Default value for whether or not executing this tool requires approval.

description: optional string

The description of the tool.

enable_parallel_execution: optional boolean

If set to True, then this tool will potentially be executed concurrently with other tools. Default False.

json_schema: optional map[unknown]

The JSON schema of the function.

last_updated_by_id: optional string

The id of the user that made this Tool.

metadata_: optional map[unknown]

A dictionary of additional metadata for the tool.

name: optional string

The name of the function.

npm_requirements: optional array of NpmRequirement { name, version }

Optional list of npm packages required by this tool.

name: string

Name of the npm package.

minLength1
version: optional string

Optional version of the package, following semantic versioning.

pip_requirements: optional array of PipRequirement { name, version }

Optional list of pip packages required by this tool.

name: string

Name of the pip package.

minLength1
version: optional string

Optional version of the package, following semantic versioning.

return_char_limit: optional number

The maximum number of characters in the response.

maximum1000000
minimum1
source_code: optional string

The source code of the function.

source_type: optional string

The type of the source code.

tags: optional array of string

Metadata tags.

tool_type: optional ToolType

The type of the tool.

Accepts one of the following:
"custom"
"letta_core"
"letta_memory_core"
"letta_multi_agent_core"
"letta_sleeptime_core"
"letta_voice_sleeptime_core"
"letta_builtin"
"letta_files_core"
"external_langchain"
"external_composio"
"external_mcp"
ToolCreate = object { source_code, args_json_schema, default_requires_approval, 8 more }
source_code: string

The source code of the function.

args_json_schema: optional map[unknown]

The args JSON schema of the function.

default_requires_approval: optional boolean

Whether or not to require approval before executing this tool.

description: optional string

The description of the tool.

enable_parallel_execution: optional boolean

If set to True, then this tool will potentially be executed concurrently with other tools. Default False.

json_schema: optional map[unknown]

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

npm_requirements: optional array of NpmRequirement { name, version }

Optional list of npm packages required by this tool.

name: string

Name of the npm package.

minLength1
version: optional string

Optional version of the package, following semantic versioning.

pip_requirements: optional array of PipRequirement { name, version }

Optional list of pip packages required by this tool.

name: string

Name of the pip package.

minLength1
version: optional string

Optional version of the package, following semantic versioning.

return_char_limit: optional number

The maximum number of characters in the response.

maximum1000000
minimum1
source_type: optional string

The source type of the function.

tags: optional array of string

Metadata tags.

ToolReturnMessage = object { id, date, status, 13 more }

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

id: string
date: string
Deprecatedstatus: "success" or "error"
Accepts one of the following:
"success"
"error"
Deprecatedtool_call_id: string
Deprecatedtool_return: string
is_err: optional boolean
message_type: optional "tool_return_message"

The type of the message.

Accepts one of the following:
"tool_return_message"
name: optional string
otid: optional string
run_id: optional string
sender_id: optional string
seq_id: optional number
Deprecatedstderr: optional array of string
Deprecatedstdout: optional array of string
step_id: optional string
tool_returns: optional array of ToolReturn { status, tool_call_id, tool_return, 3 more }
status: "success" or "error"
Accepts one of the following:
"success"
"error"
tool_call_id: string
tool_return: string
stderr: optional array of string
stdout: optional array of string
type: optional "tool"

The message type to be created.

Accepts one of the following:
"tool"
ToolType = "custom" or "letta_core" or "letta_memory_core" or 8 more
Accepts one of the following:
"custom"
"letta_core"
"letta_memory_core"
"letta_multi_agent_core"
"letta_sleeptime_core"
"letta_voice_sleeptime_core"
"letta_builtin"
"letta_files_core"
"external_langchain"
"external_composio"
"external_mcp"