CloudflareToolSet

composio-core


composio-core / index / CloudflareToolSet

Class: CloudflareToolSet

Defined in: js/src/frameworks/cloudflare.ts:18

CloudflareToolSet provides integration with Cloudflare Workers AI for executing AI tool calls and handling responses

Extends

Constructors

Constructor

new CloudflareToolSet(config): CloudflareToolSet

Defined in: js/src/frameworks/cloudflare.ts:29

Initialize a new CloudflareToolSet instance

Parameters

config

Configuration options including API key, base URL, entity ID and workspace config

allowTracing?

boolean

apiKey?

string

baseUrl?

string

connectedAccountIds?

Record<string, string>

entityId?

string

Returns

CloudflareToolSet

Overrides

ComposioToolSet.constructor

Properties

actions

actions: Actions

Defined in: js/src/sdk/base.toolset.ts:51

Inherited from

ComposioToolSet.actions


activeTriggers

activeTriggers: ActiveTriggers

Defined in: js/src/sdk/base.toolset.ts:54

Inherited from

ComposioToolSet.activeTriggers


apiKey

apiKey: string

Defined in: js/src/sdk/base.toolset.ts:43

Inherited from

ComposioToolSet.apiKey


apps

apps: Apps

Defined in: js/src/sdk/base.toolset.ts:50

Inherited from

ComposioToolSet.apps


backendClient

backendClient: AxiosBackendClient

Defined in: js/src/sdk/base.toolset.ts:48

Inherited from

ComposioToolSet.backendClient


client

client: Composio

Defined in: js/src/sdk/base.toolset.ts:42

Inherited from

ComposioToolSet.client


connectedAccountIds

connectedAccountIds: Record<string, string> = {}

Defined in: js/src/sdk/base.toolset.ts:46

Inherited from

ComposioToolSet.connectedAccountIds


connectedAccounts

connectedAccounts: ConnectedAccounts

Defined in: js/src/sdk/base.toolset.ts:49

Inherited from

ComposioToolSet.connectedAccounts


entityId

entityId: string = "default"

Defined in: js/src/sdk/base.toolset.ts:45

Inherited from

ComposioToolSet.entityId


fileName

fileName: string = "js/src/frameworks/cloudflare.ts"

Defined in: js/src/frameworks/cloudflare.ts:22


integrations

integrations: Integrations

Defined in: js/src/sdk/base.toolset.ts:53

Inherited from

ComposioToolSet.integrations


runtime

runtime: string

Defined in: js/src/sdk/base.toolset.ts:44

Inherited from

ComposioToolSet.runtime


triggers

triggers: Triggers

Defined in: js/src/sdk/base.toolset.ts:52

Inherited from

ComposioToolSet.triggers


userActionRegistry

userActionRegistry: ActionRegistry

Defined in: js/src/sdk/base.toolset.ts:56

Inherited from

ComposioToolSet.userActionRegistry


DEFAULT_ENTITY_ID

static DEFAULT_ENTITY_ID: string = "default"

Defined in: js/src/frameworks/cloudflare.ts:21


FRAMEWORK_NAME

static FRAMEWORK_NAME: string = "cloudflare"

Defined in: js/src/frameworks/cloudflare.ts:20

Methods

addPostProcessor()

addPostProcessor(processor): Promise<CloudflareToolSet>

Defined in: js/src/sdk/base.toolset.ts:369

Parameters

processor

TPostProcessor

Returns

Promise<CloudflareToolSet>

Inherited from

ComposioToolSet.addPostProcessor


addPreProcessor()

addPreProcessor(processor): Promise<CloudflareToolSet>

Defined in: js/src/sdk/base.toolset.ts:359

Parameters

processor

TPreProcessor

Returns

Promise<CloudflareToolSet>

Inherited from

ComposioToolSet.addPreProcessor


addSchemaProcessor()

addSchemaProcessor(processor): Promise<CloudflareToolSet>

Defined in: js/src/sdk/base.toolset.ts:349

Parameters

processor

TSchemaProcessor

Returns

Promise<CloudflareToolSet>

Inherited from

ComposioToolSet.addSchemaProcessor


createAction()

createAction<P>(options): Promise<{ appId: string; appKey: string; appName: string; description: string; display_name: string; enabled: boolean; logo: string; metadata: { name: string; toolName: string; }; name: string; parameters: { description: string; properties: Record<string, any>; required: string[]; title: string; type: string; }; response: Record<string, any>; tags: string[]; }>

Defined in: js/src/sdk/base.toolset.ts:225

Type Parameters

P

P extends Parameters = ZodObject<{}, UnknownKeysParam, ZodTypeAny, {}, {}>

Parameters

options

CreateActionOptions<P>

Returns

Promise<{ appId: string; appKey: string; appName: string; description: string; display_name: string; enabled: boolean; logo: string; metadata: { name: string; toolName: string; }; name: string; parameters: { description: string; properties: Record<string, any>; required: string[]; title: string; type: string; }; response: Record<string, any>; tags: string[]; }>

Inherited from

ComposioToolSet.createAction


executeAction()

executeAction(functionParams): Promise<ActionExecutionResDto>

Defined in: js/src/sdk/base.toolset.ts:241

Parameters

functionParams

ExecuteActionParams

Returns

Promise<ActionExecutionResDto>

Inherited from

ComposioToolSet.executeAction


executeToolCall()

executeToolCall(tool, entityId): Promise<string>

Defined in: js/src/frameworks/cloudflare.ts:96

Execute a single tool call

Parameters

tool

The tool to execute with name and arguments

arguments

unknown

name

string

entityId

string = null

Optional entity ID to execute the tool for

Returns

Promise<string>

Promise resolving to stringified tool execution result


getActionsSchema()

getActionsSchema(filters, _entityId?): Promise<object[]>

Defined in: js/src/sdk/base.toolset.ts:138

Parameters

filters
actions?

Sequence<string>

_entityId?

string

Returns

Promise<object[]>

Inherited from

ComposioToolSet.getActionsSchema


getEntity()

getEntity(entityId): Promise<Entity>

Defined in: js/src/sdk/base.toolset.ts:237

Parameters

entityId

string

Returns

Promise<Entity>

Inherited from

ComposioToolSet.getEntity


getTools()

getTools(filters): Promise<Sequence<AiTextGenerationToolInput>>

Defined in: js/src/frameworks/cloudflare.ts:54

Retrieve available tools based on provided filters

Parameters

filters

Optional filters for actions, apps, tags and use cases

actions?

string[] = ...

apps?

string[] = ...

filterByAvailableApps?

boolean = ...

integrationId?

string = ...

tags?

string[] = ...

useCase?

string = ...

useCaseLimit?

number = ...

Returns

Promise<Sequence<AiTextGenerationToolInput>>

Promise resolving to array of AI text generation tools


getToolsSchema()

getToolsSchema(filters, _entityId?, _integrationId?): Promise<object[]>

Defined in: js/src/sdk/base.toolset.ts:150

Parameters

filters
actions?

string[] = ...

apps?

string[] = ...

filterByAvailableApps?

boolean = ...

integrationId?

string = ...

tags?

string[] = ...

useCase?

string = ...

useCaseLimit?

number = ...

_entityId?

string

_integrationId?

string

Returns

Promise<object[]>

Inherited from

ComposioToolSet.getToolsSchema


handleToolCall()

handleToolCall(result, entityId): Promise<Sequence<string>>

Defined in: js/src/frameworks/cloudflare.ts:135

Handle tool calls from AI text generation output

Parameters

result

AiTextGenerationOutput

The AI text generation output containing tool calls

entityId

string = null

Optional entity ID to execute the tools for

Returns

Promise<Sequence<string>>

Promise resolving to array of tool execution results


removePostProcessor()

removePostProcessor(): Promise<void>

Defined in: js/src/sdk/base.toolset.ts:383

Returns

Promise<void>

Inherited from

ComposioToolSet.removePostProcessor


removePreProcessor()

removePreProcessor(): Promise<void>

Defined in: js/src/sdk/base.toolset.ts:379

Returns

Promise<void>

Inherited from

ComposioToolSet.removePreProcessor


removeSchemaProcessor()

removeSchemaProcessor(): Promise<void>

Defined in: js/src/sdk/base.toolset.ts:387

Returns

Promise<void>

Inherited from

ComposioToolSet.removeSchemaProcessor