ToolProvider
The ToolProvider interface defines how the editor discovers and resolves integration tools from external platforms. Mastra ships with two built-in implementations: ComposioToolProvider and ArcadeToolProvider.
See Tools for a guide on setting up tool providers.
ToolProvider interfaceDirect link to ToolProvider interface
Tool providers implement these methods:
listToolkits():
listTools(params?):
getToolSchema(slug):
resolveTools(slugs, options?):
ComposioToolProviderDirect link to ComposioToolProvider
Connects to Composio for access to hundreds of integration tools.
Usage exampleDirect link to Usage example
import { MastraEditor } from '@mastra/editor'
import { ComposioToolProvider } from '@mastra/editor/providers/composio'
const editor = new MastraEditor({
toolProviders: {
composio: new ComposioToolProvider({
apiKey: process.env.COMPOSIO_API_KEY!,
}),
},
})
Constructor parametersDirect link to Constructor parameters
apiKey:
Tool slugsDirect link to Tool slugs
Composio tools use uppercase slug format: GITHUB_CREATE_ISSUE, SLACK_SEND_MESSAGE.
AuthenticationDirect link to Authentication
Tool execution is scoped to a userId passed through request context. Each user authenticates with the integration separately through Composio's auth flow.
ArcadeToolProviderDirect link to ArcadeToolProvider
Connects to Arcade for a curated tool catalog with built-in authentication.
Usage exampleDirect link to Usage example
import { MastraEditor } from '@mastra/editor'
import { ArcadeToolProvider } from '@mastra/editor/providers/arcade'
const editor = new MastraEditor({
toolProviders: {
arcade: new ArcadeToolProvider({
apiKey: process.env.ARCADE_API_KEY!,
}),
},
})
Constructor parametersDirect link to Constructor parameters
apiKey:
baseURL?:
Tool slugsDirect link to Tool slugs
Arcade tools use Toolkit.ToolName format: Github.GetRepository, Slack.SendMessage.
AuthenticationDirect link to Authentication
Like Composio, tool execution requires a userId for per-user authorization through Arcade's auth flow.