CustomTools
@composio/core / CustomTools / CustomTools
Class: CustomTools
Defined in: ts/packages/core/src/models/CustomTools.ts:36
Constructors
Constructor
new CustomTools(
client
):CustomTools
Defined in: ts/packages/core/src/models/CustomTools.ts:40
Parameters
client
Composio
Returns
CustomTools
Methods
createTool()
createTool<
T
>(toolOptions
):Promise
<{ }>
Defined in: ts/packages/core/src/models/CustomTools.ts:75
Create a custom tool and registers it in the registry. This is just an in memory registry and is not persisted.
Type Parameters
T
T
extends CustomToolInputParameter
Parameters
toolOptions
CustomToolOptions
<T
>
CustomToolOptions
Returns
Promise
<{ }>
The tool created
Example
executeCustomTool()
executeCustomTool(
slug
,body
):Promise
<{ }>
Defined in: ts/packages/core/src/models/CustomTools.ts:236
Execute a custom tool
Parameters
slug
string
The slug of the tool to execute
body
Returns
Promise
<{ }>
The response from the tool
Description
If a toolkit is used, the connected account id is used to execute the tool. If a connected account id is provided, it is used to execute the tool. If a connected account id is not provided, the first connected account for the toolkit is used.
getCustomToolBySlug()
getCustomToolBySlug(
slug
):Promise
<{ }>
Defined in: ts/packages/core/src/models/CustomTools.ts:168
Get a custom tool by slug from the registry.
Parameters
slug
string
The slug of the tool to get
Returns
Promise
<{ }>
The tool
Example
getCustomTools()
getCustomTools(
__namedParameters
):Promise
<ToolList
>
Defined in: ts/packages/core/src/models/CustomTools.ts:133
Get all the custom tools from the registry.
Parameters
__namedParameters
toolSlugs?
string
[]
Returns
Promise
<ToolList
>
The list of tools