Tool Calling
Execute a tool using a connected account
Changed onExecutes 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
- Base URLhttps://$SCALEKIT_ENVIRONMENT_URL
- AuthOAuth 2Client credentialsToken URLhttps://$SCALEKIT_ENVIRONMENT_URL/oauth/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
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"
}Changes
- info
added the non-success response with the status
- info
- info
added the non-success response with the status
- info