CustomToolkits
Usage
Access this class through the composio.customToolkits property:
const composio = new Composio({ apiKey: 'your-api-key' });
const result = await composio.customToolkits.list();Methods
delete()
Deletes a custom toolkit owned by the project, with its tools, auth
configs and connected accounts. The credentials behind those connected
accounts are revoked in background jobs (revokeJobIds).
Experimental — custom toolkits are in pilot; shape may change.
Composio-managed toolkits cannot be deleted; the API answers 403.
async delete(slug: string, requestOptions?: ComposioRequestOptions): Promise<CustomToolkitDeleteResponse>Parameters
| Name | Type | Description |
|---|---|---|
slug | string | The custom toolkit slug (CUSTOM_...) |
requestOptions? | ComposioRequestOptions |
Returns
Promise<CustomToolkitDeleteResponse> — What was deleted
Example
const result = await composio.experimental.customToolkits.delete('CUSTOM_MY_TOOLKIT');
console.log(result.connectedAccountsDeleted);sync()
Re-fetches the tool definitions of a custom toolkit from its remote MCP server. Call it when automatic sync fails or the remote tools change. Experimental — custom toolkits are in pilot; shape may change.
async sync(slug: string, params?: CustomToolkitSyncParams, requestOptions?: ComposioRequestOptions): Promise<CustomToolkitSyncResponse>Parameters
| Name | Type | Description |
|---|---|---|
slug | string | The custom toolkit slug (CUSTOM_...) |
params? | CustomToolkitSyncParams | Optional connected account to fetch the definitions with |
requestOptions? | ComposioRequestOptions |
Returns
Promise<CustomToolkitSyncResponse> — The toolkit version and number of tools synced
Example
const { version, syncedCount } = await composio.experimental.customToolkits.sync(
'CUSTOM_MY_TOOLKIT',
{ connectedAccountId: 'ca_abc123' }
);upsert()
Creates a custom toolkit, or updates its display metadata (name, API key field copy) when the project already owns a toolkit with this slug. Experimental — custom toolkits are in pilot; shape may change.
appUrl and authSchemes cannot change on an existing toolkit:
re-sending them unchanged is a no-op, and changing them fails with a 409.
Delete and re-register the toolkit instead, which revokes its connections.
async upsert(params: CustomToolkitUpsertParams, requestOptions?: ComposioRequestOptions): Promise<CustomToolkitUpsertResponse>Parameters
| Name | Type | Description |
|---|---|---|
params | CustomToolkitUpsertParams | The slug and toolkit configuration |
requestOptions? | ComposioRequestOptions |
Returns
Promise<CustomToolkitUpsertResponse> — The toolkit's slug
Example
await composio.experimental.customToolkits.upsert({
slug: 'INTERNAL_API',
toolkitConfig: {
name: 'Internal API',
appUrl: 'https://mcp.internal.example.com/mcp',
authSchemes: [
{ mode: 'API_KEY', headers: { Authorization: 'Bearer {{generic_api_key}}' } },
],
},
});