tealflow_check_shiny_startup
Validate a Shiny app starts without errors by running the app file. Detect startup issues like missing packages, syntax errors, or timeouts to confirm correct configuration before interactive use.
Instructions
Check if a Shiny app starts without errors.
This tool runs the Shiny app file using shiny::runApp() to detect startup errors without keeping the app running or waiting for user interaction. It's useful for validating that a Teal application has been correctly configured before attempting to run it interactively.
Args: app_path (str, optional): Path to the Shiny app directory. Defaults to ".". app_filename (str, optional): Name of the app file to run (e.g., 'app.R', 'server.R'). Defaults to "app.R". timeout_seconds (int, optional): Maximum time in seconds to allow the app to start (1-120). Defaults to 15.
Returns: str: JSON object with startup validation results
Success response:
{
"status": "ok",
"error_type": null,
"message": "App started successfully",
"logs_excerpt": "... last 20 lines of output ..."
}
Error response:
{
"status": "error",
"error_type": "missing_package" | "syntax_error" | "object_not_found" |
"timeout" | "file_not_found" | "rscript_not_found" |
"connection_error" | "execution_error",
"message": "Detailed error description",
"logs_excerpt": "... last 30 lines of output ..."
}Error Types: - missing_package: Required R package is not installed - syntax_error: R syntax error in app.R - object_not_found: Referenced R object does not exist - timeout: App did not start within the specified timeout - file_not_found: app.R file not found at specified path - rscript_not_found: Rscript command not available (R not installed) - connection_error: Network or file connection error - execution_error: Other R execution error
Examples: - Check app in current directory: (no parameters needed) - Check app in specific directory: app_path="/path/to/app" - Check specific app file: app_filename="server.R" - Use longer timeout: timeout_seconds=30
Note: This tool does not launch an interactive Shiny session. It only validates that the app can start without immediate errors. The process is terminated once startup is confirmed or an error is detected.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_path | No | . | |
| app_filename | No | app.R | |
| timeout_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |