LettaAPI.Api.Tools (letta_api v1.0.0)
API calls for all endpoints tagged Tools
.
Summary
Functions
Upsert Base Tools Upsert base tools
Add Composio Tool
Add a new Composio tool by action name (Composio refers to each tool as an Action
)
Add Mcp Server To Config Add a new MCP server to the Letta MCP server config
Add Mcp Tool Register a new MCP tool as a Letta server by MCP server + tool name
Count Tools Get a count of all tools available to agents belonging to the org of the user
Create Tool Create a new tool
Delete Mcp Server From Config Add a new MCP server to the Letta MCP server config
Delete Tool Delete a tool by name
List Composio Actions By App Get a list of all Composio actions for a specific app
List Composio Apps Get a list of all Composio apps
List Mcp Servers Get a list of all configured MCP servers
List Mcp Tools By Server Get a list of all tools for a specific MCP server
List Tools Get a list of all tools available to agents belonging to the org of the user
Modify Tool Update an existing tool
Retrieve Tool Get a tool by ID
Run Tool From Source Attempt to build a tool from source, then run it on the provided arguments
Upsert Tool Create or update a tool
Functions
@spec add_base_tools( Tesla.Env.client(), keyword() ) :: {:ok, LettaAPI.Model.HttpValidationError.t()} | {:ok, [LettaAPI.Model.Tool.t()]} | {:error, Tesla.Env.t()}
Upsert Base Tools Upsert base tools
Parameters
connection
(LettaAPI.Connection): Connection to serveropts
(keyword): Optional parameters:user_id
(String.t):
Returns
{:ok, [%Tool{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec add_composio_tool(Tesla.Env.client(), String.t(), keyword()) :: {:ok, LettaAPI.Model.Tool.t()} | {:ok, LettaAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
Add Composio Tool
Add a new Composio tool by action name (Composio refers to each tool as an Action
)
Parameters
connection
(LettaAPI.Connection): Connection to servercomposio_action_name
(String.t):opts
(keyword): Optional parameters:user_id
(String.t):
Returns
{:ok, LettaAPI.Model.Tool.t}
on success{:error, Tesla.Env.t}
on failure
@spec add_mcp_server(Tesla.Env.client(), LettaAPI.Model.Request.t(), keyword()) :: {:ok, [LettaAPI.Model.ResponseListMcpServersValue.t()]} | {:ok, LettaAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
Add Mcp Server To Config Add a new MCP server to the Letta MCP server config
Parameters
connection
(LettaAPI.Connection): Connection to serverrequest
(Request):opts
(keyword): Optional parameters:user_id
(String.t):
Returns
{:ok, [%ResponseListMcpServersValue{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec add_mcp_tool(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, LettaAPI.Model.Tool.t()} | {:ok, LettaAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
Add Mcp Tool Register a new MCP tool as a Letta server by MCP server + tool name
Parameters
connection
(LettaAPI.Connection): Connection to servermcp_server_name
(String.t):mcp_tool_name
(String.t):opts
(keyword): Optional parameters:user_id
(String.t):
Returns
{:ok, LettaAPI.Model.Tool.t}
on success{:error, Tesla.Env.t}
on failure
@spec count_tools( Tesla.Env.client(), keyword() ) :: {:ok, integer()} | {:ok, LettaAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
Count Tools Get a count of all tools available to agents belonging to the org of the user
Parameters
connection
(LettaAPI.Connection): Connection to serveropts
(keyword): Optional parameters:user_id
(String.t):
Returns
{:ok, integer()}
on success{:error, Tesla.Env.t}
on failure
@spec create_tool(Tesla.Env.client(), LettaAPI.Model.ToolCreate.t(), keyword()) :: {:ok, LettaAPI.Model.Tool.t()} | {:ok, LettaAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
Create Tool Create a new tool
Parameters
connection
(LettaAPI.Connection): Connection to servertool_create
(ToolCreate):opts
(keyword): Optional parameters:user_id
(String.t):
Returns
{:ok, LettaAPI.Model.Tool.t}
on success{:error, Tesla.Env.t}
on failure
@spec delete_mcp_server(Tesla.Env.client(), String.t(), keyword()) :: {:ok, [LettaAPI.Model.ResponseListMcpServersValue.t()]} | {:ok, LettaAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
Delete Mcp Server From Config Add a new MCP server to the Letta MCP server config
Parameters
connection
(LettaAPI.Connection): Connection to servermcp_server_name
(String.t):opts
(keyword): Optional parameters:user_id
(String.t):
Returns
{:ok, [%ResponseListMcpServersValue{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec delete_tool(Tesla.Env.client(), String.t(), keyword()) :: {:ok, any()} | {:ok, LettaAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
Delete Tool Delete a tool by name
Parameters
connection
(LettaAPI.Connection): Connection to servertool_id
(String.t):opts
(keyword): Optional parameters:user_id
(String.t):
Returns
{:ok, any()}
on success{:error, Tesla.Env.t}
on failure
@spec list_composio_actions_by_app(Tesla.Env.client(), String.t(), keyword()) :: {:ok, LettaAPI.Model.HttpValidationError.t()} | {:ok, [LettaAPI.Model.ActionModel.t()]} | {:error, Tesla.Env.t()}
List Composio Actions By App Get a list of all Composio actions for a specific app
Parameters
connection
(LettaAPI.Connection): Connection to servercomposio_app_name
(String.t):opts
(keyword): Optional parameters:user_id
(String.t):
Returns
{:ok, [%ActionModel{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec list_composio_apps( Tesla.Env.client(), keyword() ) :: {:ok, [LettaAPI.Model.AppModel.t()]} | {:ok, LettaAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
List Composio Apps Get a list of all Composio apps
Parameters
connection
(LettaAPI.Connection): Connection to serveropts
(keyword): Optional parameters:"user-id"
(String.t):
Returns
{:ok, [%AppModel{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec list_mcp_servers( Tesla.Env.client(), keyword() ) :: {:ok, %{optional(String.t()) => LettaAPI.Model.ResponseListMcpServersValue.t()}} | {:ok, LettaAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
List Mcp Servers Get a list of all configured MCP servers
Parameters
connection
(LettaAPI.Connection): Connection to serveropts
(keyword): Optional parameters:"user-id"
(String.t):
Returns
{:ok, %{}}
on success{:error, Tesla.Env.t}
on failure
@spec list_mcp_tools_by_server(Tesla.Env.client(), String.t(), keyword()) :: {:ok, LettaAPI.Model.HttpValidationError.t()} | {:ok, [LettaAPI.Model.McpTool.t()]} | {:error, Tesla.Env.t()}
List Mcp Tools By Server Get a list of all tools for a specific MCP server
Parameters
connection
(LettaAPI.Connection): Connection to servermcp_server_name
(String.t):opts
(keyword): Optional parameters:user_id
(String.t):
Returns
{:ok, [%McpTool{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec list_tools( Tesla.Env.client(), keyword() ) :: {:ok, LettaAPI.Model.HttpValidationError.t()} | {:ok, [LettaAPI.Model.Tool.t()]} | {:error, Tesla.Env.t()}
List Tools Get a list of all tools available to agents belonging to the org of the user
Parameters
connection
(LettaAPI.Connection): Connection to serveropts
(keyword): Optional parameters:after
(String.t)::limit
(integer())::name
(String.t)::user_id
(String.t):
Returns
{:ok, [%Tool{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec modify_tool( Tesla.Env.client(), String.t(), LettaAPI.Model.ToolUpdate.t(), keyword() ) :: {:ok, LettaAPI.Model.Tool.t()} | {:ok, LettaAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
Modify Tool Update an existing tool
Parameters
connection
(LettaAPI.Connection): Connection to servertool_id
(String.t):tool_update
(ToolUpdate):opts
(keyword): Optional parameters:user_id
(String.t):
Returns
{:ok, LettaAPI.Model.Tool.t}
on success{:error, Tesla.Env.t}
on failure
@spec retrieve_tool(Tesla.Env.client(), String.t(), keyword()) :: {:ok, LettaAPI.Model.Tool.t()} | {:ok, LettaAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
Retrieve Tool Get a tool by ID
Parameters
connection
(LettaAPI.Connection): Connection to servertool_id
(String.t):opts
(keyword): Optional parameters:user_id
(String.t):
Returns
{:ok, LettaAPI.Model.Tool.t}
on success{:error, Tesla.Env.t}
on failure
@spec run_tool_from_source( Tesla.Env.client(), LettaAPI.Model.ToolRunFromSource.t(), keyword() ) :: {:ok, LettaAPI.Model.ToolReturnMessage.t()} | {:ok, LettaAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
Run Tool From Source Attempt to build a tool from source, then run it on the provided arguments
Parameters
connection
(LettaAPI.Connection): Connection to servertool_run_from_source
(ToolRunFromSource):opts
(keyword): Optional parameters:user_id
(String.t):
Returns
{:ok, LettaAPI.Model.ToolReturnMessage.t}
on success{:error, Tesla.Env.t}
on failure
@spec upsert_tool(Tesla.Env.client(), LettaAPI.Model.ToolCreate.t(), keyword()) :: {:ok, LettaAPI.Model.Tool.t()} | {:ok, LettaAPI.Model.HttpValidationError.t()} | {:error, Tesla.Env.t()}
Upsert Tool Create or update a tool
Parameters
connection
(LettaAPI.Connection): Connection to servertool_create
(ToolCreate):opts
(keyword): Optional parameters:user_id
(String.t):
Returns
{:ok, LettaAPI.Model.Tool.t}
on success{:error, Tesla.Env.t}
on failure