Cancel a pending or running workflow run. Only runs with status "pending" or "running" can be cancelled. Cancelled runs do not consume credits.
This is a mutating tool subject to the stricter rate limit of 10 requests/minute.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
runId |
string | Yes | The run ID to cancel |
companyId |
string | Auto-injected | Injected from your API key. Do not pass this. |
Example Request
curl -X POST https://socialcrm.com/api/mcp-app \
-H "Authorization: Bearer sk_live_YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "1",
"method": "tools/call",
"params": {
"name": "cancel_workflow_run",
"arguments": {
"runId": "run_f47ac10b-58cc-4372-a567-0e02b2c3d479"
}
}
}'Example Response
Parsed from result.content[0].text:
{
"runId": "run_f47ac10b-58cc-4372-a567-0e02b2c3d479",
"status": "cancelled",
"message": "Workflow run has been cancelled."
}Output Schema
| Field | Type | Description |
|---|---|---|
runId |
string | The cancelled run's UUID |
status |
string | Always "cancelled" on success |
message |
string | Confirmation message |
Notes
- Only runs with status
"pending"or"running"can be cancelled. Attempting to cancel a completed, failed, or already cancelled run returns an error. - Reserved credits are released immediately upon cancellation.
- Returns an error if the
runIddoes not exist or does not belong to your company.