Tool Calling
Execute a tool using a connected account
Executes a tool action using authentication credentials from a connected account. Specify the tool by name and provide required parameters as JSON. The connected account can be identified by ID, or by combination of organization/user, connector, and identifier. Returns the execution result data and a unique execution ID for tracking. Use this endpoint to perform actions like sending emails, creating calendar events, or managing resources in external services.
post/api/v1/execute_tool
Request body
Example request
{
"agent_run_id": "run_abc123",
"connected_account_id": "ca_123",
"connector": "Google Workspace",
"identifier": "user@example.com",
"organization_id": "org_123",
"params": {
"body": "Hello World",
"subject": "Hello",
"to": "user@example.com"
},
"tool_name": "send_email",
"user_id": "user_123"
}Response
Tool executed successfully with result data and execution ID
Example response
{
"data": {
"body": "Hello World",
"subject": "Hello",
"to": "user@example.com"
},
"execution_id": "123456789"
}