cancel_hex_run
Terminates an active Hex project run by specifying the project and run UUIDs via the Hex API MCP Server, ensuring efficient project management.
Instructions
Cancel a running project.
Args:
project_id: The UUID of the Hex project
run_id: The UUID of the run to cancel
Returns:
Success message
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | ||
| run_id | Yes |
Implementation Reference
- src/hex_mcp/server.py:232-244 (handler)The handler function for the 'cancel_hex_run' tool. It is decorated with @mcp.tool() which also serves as its registration. The function cancels a specific run in a Hex project by sending a DELETE request to the Hex API endpoint and returns a success message.@mcp.tool() async def cancel_hex_run(project_id: str, run_id: str) -> str: """Cancel a running project. Args: project_id: The UUID of the Hex project run_id: The UUID of the run to cancel Returns: Success message """ await hex_request("DELETE", f"/projects/{project_id}/runs/{run_id}") return "Run cancelled successfully"