Cancel Livy Statement
livy_cancel_statementCancel a running Livy statement while keeping the session active for new queries. This tool stops statements in 'waiting' or 'running' state without terminating the session.
Instructions
Cancel a running Livy statement without killing the session.
Cancels a statement that is currently 'waiting' or 'running'. The statement will transition to 'cancelling' then 'cancelled' state. The session remains available for new statements.
Note: Only works on statements in 'waiting' or 'running' state.
Parameters: workspace_id: Fabric workspace ID. lakehouse_id: Fabric lakehouse ID. session_id: Livy session ID. statement_id: Statement ID to cancel.
Returns: Dictionary with cancellation result (typically {"msg": "canceled"}).
Example:
python result = livy_cancel_statement( workspace_id="12345678-1234-1234-1234-123456789abc", lakehouse_id="87654321-4321-4321-4321-210987654321", session_id="0", statement_id="1" )
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workspace_id": "<workspace_id>",
"lakehouse_id": "<lakehouse_id>",
"session_id": "<session_id>",
"statement_id": "<statement_id>"
},
"name": "livy_cancel_statement"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_id | Yes | ||
| lakehouse_id | Yes | ||
| session_id | Yes | ||
| statement_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||