run_hex_project
Execute Hex projects by providing project ID, optional input parameters, and option to update published results. Returns JSON with run details via the Hex API MCP Server.
Instructions
Run a Hex project.
Args:
project_id: The UUID of the Hex project to run
input_params: Optional input parameters for the project
update_published_results: Whether to update published results
Returns:
JSON string with run details
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input_params | No | ||
| project_id | Yes | ||
| update_published_results | No |
Implementation Reference
- src/hex_mcp/server.py:209-230 (handler)The main handler function for the 'run_hex_project' tool. It is registered via the @mcp.tool() decorator. The function constructs a run configuration and makes a POST request to the Hex API to execute the project run, returning the result as JSON.@mcp.tool() async def run_hex_project(project_id: str, input_params: dict = None, update_published_results: bool = False) -> str: """Run a Hex project. Args: project_id: The UUID of the Hex project to run input_params: Optional input parameters for the project update_published_results: Whether to update published results Returns: JSON string with run details """ run_config = { "inputParams": input_params or {}, "updatePublishedResults": update_published_results, "useCachedSqlResults": True, } result = await hex_request("POST", f"/projects/{project_id}/runs", json=run_config) return result