Discover and Execute a Tool
A 4-step recipe with Composio. We can help you get access.
Recipe · 4 steps
Discover and Execute a Tool
with Composio
Find a tool inside a toolkit and execute it for a connected user.
- List the available toolkits, optionally filtered by a search term, to confirm the requested toolkit exists in the catalog.
- List the tools that belong to the selected toolkit so the desired tool can be located before fetching its full schema.
- Fetch the full definition of the chosen tool, including its input parameters, so the execution arguments can be validated.
- Execute the tool with the supplied arguments on behalf of the user and the optional connected account, returning the structured result.
What you'll need to have ready
- apiKey: Composio project API key sent in the x-api-key header.
- toolkitSlug: The toolkit slug to scope the tool search to (e.g. "github").
- toolSlug: The slug of the tool to inspect and execute (e.g. "GITHUB_CREATE_AN_ISSUE").
- userId: The end-user identifier the tool runs on behalf of.
- connectedAccountId: Optional connected account id used to authorize the tool execution.
- arguments: The argument map passed to the tool, matching its input parameters.
For your developer
Arazzo workflow composio:discover-and-execute-tool, 4 operations: getToolkits → getTools → getToolsByToolSlug → postToolsExecuteByToolSlug. Specs on APIs.io.