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

Open in Claude
Open in ChatGPT

Tools

Delete Tool
client.tools.delete(stringtoolID, RequestOptionsoptions?): ToolDeleteResponse
delete/v1/tools/{tool_id}
Retrieve Tool
client.tools.retrieve(stringtoolID, RequestOptionsoptions?): Tool { id, args_json_schema, created_by_id, 14 more }
get/v1/tools/{tool_id}
Modify Tool
client.tools.modify(stringtoolID, ToolModifyParams { args_json_schema, default_requires_approval, description, 9 more } body, RequestOptionsoptions?): Tool { id, args_json_schema, created_by_id, 14 more }
patch/v1/tools/{tool_id}
List Tools
client.tools.list(ToolListParams { after, before, exclude_tool_types, 9 more } query?, RequestOptionsoptions?): ArrayPage<Tool { id, args_json_schema, created_by_id, 14 more } >
get/v1/tools/
Create Tool
client.tools.create(ToolCreateParams { source_code, args_json_schema, default_requires_approval, 8 more } body, RequestOptionsoptions?): Tool { id, args_json_schema, created_by_id, 14 more }
post/v1/tools/
Upsert Tool
client.tools.upsert(ToolUpsertParams { source_code, args_json_schema, default_requires_approval, 8 more } body, RequestOptionsoptions?): Tool { id, args_json_schema, created_by_id, 14 more }
put/v1/tools/
Upsert Base Tools
client.tools.upsertBaseTools(RequestOptionsoptions?): ToolUpsertBaseToolsResponse { id, args_json_schema, created_by_id, 14 more }
post/v1/tools/add-base-tools
ModelsExpand Collapse
NpmRequirement { name, version }
name: string

Name of the npm package.

minLength1
version?: string | null

Optional version of the package, following semantic versioning.

PipRequirement { name, version }
name: string

Name of the pip package.

minLength1
version?: string | null

Optional version of the package, following semantic versioning.

Tool { 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?: Record<string, unknown> | null

The args JSON schema of the function.

created_by_id?: string | null

The id of the user that made this Tool.

default_requires_approval?: boolean | null

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

description?: string | null

The description of the tool.

enable_parallel_execution?: boolean | null

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

json_schema?: Record<string, unknown> | null

The JSON schema of the function.

last_updated_by_id?: string | null

The id of the user that made this Tool.

metadata_?: Record<string, unknown> | null

A dictionary of additional metadata for the tool.

name?: string | null

The name of the function.

npm_requirements?: Array<NpmRequirement { name, version } > | null

Optional list of npm packages required by this tool.

name: string

Name of the npm package.

minLength1
version?: string | null

Optional version of the package, following semantic versioning.

pip_requirements?: Array<PipRequirement { name, version } > | null

Optional list of pip packages required by this tool.

name: string

Name of the pip package.

minLength1
version?: string | null

Optional version of the package, following semantic versioning.

return_char_limit?: number

The maximum number of characters in the response.

maximum1000000
minimum1
source_code?: string | null

The source code of the function.

source_type?: string | null

The type of the source code.

tags?: Array<string>

Metadata tags.

tool_type?: 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 { source_code, args_json_schema, default_requires_approval, 8 more }
source_code: string

The source code of the function.

args_json_schema?: Record<string, unknown> | null

The args JSON schema of the function.

default_requires_approval?: boolean | null

Whether or not to require approval before executing this tool.

description?: string | null

The description of the tool.

enable_parallel_execution?: boolean | null

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

json_schema?: Record<string, unknown> | null

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

npm_requirements?: Array<NpmRequirement { name, version } > | null

Optional list of npm packages required by this tool.

name: string

Name of the npm package.

minLength1
version?: string | null

Optional version of the package, following semantic versioning.

pip_requirements?: Array<PipRequirement { name, version } > | null

Optional list of pip packages required by this tool.

name: string

Name of the pip package.

minLength1
version?: string | null

Optional version of the package, following semantic versioning.

return_char_limit?: number

The maximum number of characters in the response.

maximum1000000
minimum1
source_type?: string

The source type of the function.

tags?: Array<string> | null

Metadata tags.

ToolReturnMessage { 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" | "error"
Accepts one of the following:
"success"
"error"
Deprecatedtool_call_id: string
Deprecatedtool_return: string
is_err?: boolean | null
message_type?: "tool_return_message"

The type of the message.

Accepts one of the following:
"tool_return_message"
name?: string | null
otid?: string | null
run_id?: string | null
sender_id?: string | null
seq_id?: number | null
Deprecatedstderr?: Array<string> | null
Deprecatedstdout?: Array<string> | null
step_id?: string | null
tool_returns?: Array<ToolReturn { status, tool_call_id, tool_return, 3 more } > | null
status: "success" | "error"
Accepts one of the following:
"success"
"error"
tool_call_id: string
tool_return: string
stderr?: Array<string> | null
stdout?: Array<string> | null
type?: "tool"

The message type to be created.

Accepts one of the following:
"tool"
ToolType = "custom" | "letta_core" | "letta_memory_core" | 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"