TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ComposioHQ/composio/llms.txt
Use this file to discover all available pages before exploring further.
Tools class manages tool retrieval and execution. Use composio.tools.get() to retrieve tools formatted for your AI provider, and composio.tools.execute() to run any tool directly. All tools — both built-in Composio tools and custom tools registered via createCustomTool() — are accessible through this interface.
tools.get()
Retrieve tools formatted for your AI provider. The returned collection depends on the active provider — forOpenAIProvider this is an array of OpenAI function-calling tool definitions.
External user identifier whose connected accounts are used to scope tool execution.
Filters that control which tools are returned. Provide one of
toolkits, tools, search, or authConfigIds.Provider-level options applied during tool retrieval.
tools.execute()
Execute any tool directly by slug. This bypasses the provider and returns a rawToolExecuteResponse. By default, manual execution requires a pinned toolkit version — pass dangerouslySkipVersionCheck: true or configure toolkitVersions at SDK initialization to avoid the version check.
Tool identifier (e.g.
'GITHUB_CREATE_ISSUE').Execution parameters.
Lifecycle hooks for the execution.
ToolExecuteResponse
The tool’s output data.
Error message if the tool failed, otherwise
null.true when the tool executed without errors.Composio log identifier for this execution, useful for debugging.
Optional session metadata returned by the backend for tool router session executions.
tools.getRawComposioTools()
Fetch tools in the internal SDK format without provider wrapping. Useful when you need to inspect tool schemas directly or build custom provider integrations.tools.getRawComposioToolBySlug()
Fetch a single tool by slug in the internal SDK format.tools.proxyExecute()
Proxy a custom HTTP request through a toolkit’s connected account authentication layer, without calling a specific tool.The API endpoint URL to call.
HTTP method (
'GET', 'POST', 'PUT', 'DELETE', 'PATCH').Connected account whose credentials are injected.
Request body for POST/PUT/PATCH requests.
Additional query or header parameters to inject.
Modifiers
Modifiers are hooks that transform tool inputs and outputs globally for all provider-dispatched calls.| Modifier | When it runs | Use case |
|---|---|---|
beforeExecute | Before tool execution | Inject extra arguments, log requests, enforce policies |
afterExecute | After tool execution | Sanitize responses, log results, transform output |
modifySchema | During tool retrieval | Add/remove schema fields, override descriptions |
Examples
- Get tools for OpenAI
- Execute a tool directly
- Schema modifier
- Execute with lifecycle hooks