Using the SeaLights MCP server
Best practices for MCP prompting
The server provides a standardized way to interact with the SeaLights platform programmatically through a tool-based architecture.
Effective prompting is key to getting the most out of the Sealights MCP integration. This topic provides the various tools, input/output details and examples to help you get the most out of the Sealights MCP.
Available MCP tools
Below is a comprehensive list of all tools available through the MCP SeaLights Server, organized by category.
Cockpit Tools
Cockpit tools provide access to agent and lab management functionality as well as audit logs.
cockpit_get_live_agents
Retrieves information about live agents with optional filtering
appName
(string, optional), branchName
(string, optional), buildName
(string, optional), labId
(string, optional), type
(string, optional), bsid
(string, optional), top
(string, optional, default "100")
JSON array of filtered agent data
"Show me all active Java agents in production lab"
cockpit_get_live_labs
Retrieves information about all live labs
None
JSON array of lab data
"List all the active labs"
cockpit_get_live_components_by_lab_id
Gets components for a specific lab
lab_id
(string)
JSON array of component data
"What components are in lab LAB-123?"
cockpit_get_agent_default_version
Gets the default version for a specific agent
agent_type
(string)
JSON object with version info
"What's the default version for the Java agent?"
cockpit_get_audit_log_actions
Gets a list of available audit log action types
None
JSON array of action types
"What kinds of actions are tracked in audit logs?"
cockpit_download_audit_log
Downloads audit log for a specific time range
start_time
(string in ISO 8601 format, e.g., "2023-01-01T00:00:00Z"), end_time
(string in ISO 8601 format, e.g., "2023-01-31T23:59:59Z"), action_types
(array, optional)
CSV data
"Download the audit logs from March 1st to March 15th"
Coverage Tools
Coverage tools provide access to application, branch, build, and code management functionality.
coverage_get_apps
Retrieves a list of all applications
None
JSON array of application data
"List all the applications in the system"
coverage_get_branches
Gets branches for a specific application
app_name
(string)
JSON array of branch data
"Show me the branches for the MyApp application"
coverage_set_quality_gates
Sets quality gates for an application
app_name
(string), quality_gates
(object)
JSON response
"Update the quality gates for MyApp to require 80% code coverage"
does_branch_exist
Checks if a branch exists for an application
app_name
(string), branch_name
(string)
Boolean
"Does the develop branch exist for the MyApp application?"
toggle_hidden_flag_for_app
Shows or hides an application
app_name
(string), hidden
(boolean)
JSON response
"Hide the test application from the dashboard"
toggle_hidden_flag_for_app_branch
Shows or hides a branch
app_name
(string), branch_name
(string), hidden
(boolean)
JSON response
"Hide the deprecated-feature branch in the MyApp application"
submit_batch_task
Submits a new batch task
task_type
(string), params
(object)
JSON response
"Submit a batch task to recalculate coverage for all builds in MyApp"
get_batch_task_by_id
Gets a batch task by ID
task_id
(string)
JSON object
"What's the status of batch task ABC123?"
search_batch_tasks
Searches for batch tasks
various filter parameters
JSON array
"Find all batch tasks that failed in the last week"
download_batch_task_completion_report_file
Downloads a completion report for a batch task
task_id
(string)
File data
"Download the completion report for batch task ABC123"
coverage_get_builds
Gets builds for a specific app and branch
app_name
(string), branch_name
(string)
JSON array
"List all builds for the main branch of MyApp"
get_build_metadata
Gets metadata for a specific build
bs_id
(string)
JSON object
"Show me the metadata for build session BS123"
get_tests_state
Gets test states for a specific build
bs_id
(string)
JSON object
"What's the test status for build session BS123?"
get_quality_status
Gets quality status for a specific build
bs_id
(string)
JSON object
"Did build session BS123 pass the quality gates?"
set_reference_build
Sets or unsets a build as reference
bs_id
(string), is_reference
(boolean)
JSON response
"Set build BS123 as the reference build"
get_builds
Gets a list of builds for an app/branch
app_name
(string), branch_name
(string), limit
(number)
JSON array
"Get the last 10 builds from MyApp's develop branch"
resolve_builds
Resolves builds based on app name, branch name and time range
app_name
(string), branch_name
(string), period_from
(string), period_to
(string, optional), include_prs
(boolean, optional), offset
(number, optional), limit
(number, optional)
JSON object
"Get builds from MyApp's main branch between yesterday and today"
filter_builds_by_tags
Filters builds by tags
app_name
(string), tags
(array)
JSON array
"Find all builds tagged with 'production' in MyApp"
add_and_update_tags_for_build
Adds or updates tags for a build
bs_id
(string), tags
(object)
JSON response
"Tag build BS123 as 'tested' and 'ready'"
delete_tag_from_specific_build
Deletes a tag from a build
bs_id
(string), tag_name
(string)
JSON response
"Remove the 'failed' tag from build BS123"
coverage_get_code_domains
Gets code domains with optional filtering by domain names
code_domain_names
(array of strings, optional)
JSON array
"Get all code domains" or "Get code domains for Team1 and Team2"
create_code_domain
Creates a new code domain or updates existing domain's app list
code_domain_name
(string), apps
(array of objects with appName properties)
JSON response
"Create a new code domain called 'Backend APIs' with app1 and app2"
get_code_domains
Gets all code domains
None
JSON array
"Show me all code domains in the system"
delete_code_domain
Deletes a code domain
code_domain_name
(string)
JSON response
"Delete the 'Team1' code domain"
get_code_labels
Gets code labels
None
JSON array
"What code labels are defined in the system?"
bulk_create_code_label_rules
Creates code label rules in bulk
rules
(array)
JSON response
"Create label rules to identify security-sensitive code"
bulk_delete_code_label_rules
Deletes code label rules in bulk
rule_ids
(array)
JSON response
"Delete these outdated label rules"
get_code_scope_rules
Gets code scope rules
None
JSON array
"Show me all code scope rules"
create_code_scope_rules
Creates code scope rules
rules
(array)
JSON response
"Create scope rules for our microservices"
delete_code_scope_rule
Deletes a code scope rule
rule_id
(string)
JSON response
"Delete the obsolete scope rule RS123"
update_code_scope_rule
Updates a code scope rule
rule_id
(string), rule_data
(object)
JSON response
"Update scope rule RS123 to include the new module"
get_build_coverage
Gets coverage data for a build
bs_id
(string), various options
JSON object
"Get code coverage details for build BS123"
download_build_coverage_csv
Downloads build coverage as CSV
bs_id
(string)
CSV data
"Download the coverage report for build BS123 as CSV"
get_aggregated_coverage_report_data
Gets aggregated coverage data
bs_id
(string), aggregation
(string)
JSON object
"Show me the aggregated coverage by package for build BS123"
create_update_integration_build_components
Creates/updates integration build components
lab_id
(string), components
(array)
JSON response
"Update the components for the integration build in lab LAB123"
delete_integration_build_components
Deletes integration build components
lab_id
(string), component_ids
(array)
JSON response
"Remove components C1 and C2 from the integration build"
coverage_get_integration_builds
Gets integration builds
app_name
(string), branch_name
(string)
JSON array
"List all integration builds for MyApp's main branch"
attach_integration_build_to_lab
Attaches an integration build to a lab
lab_id
(string), bs_id
(string)
JSON response
"Attach build BS123 to lab LAB456"
generate_integration_build
Generates an integration build
lab_id
(string), build_data
(object)
JSON response
"Generate a new integration build for lab LAB123"
create_integration_build_lab
Creates an integration build lab
name
(string), config
(object)
JSON response
"Create a new integration build lab called 'Staging Environment'"
get_lab_ids
Gets lab IDs
None
JSON array
"List all lab IDs in the system"
resolve_build_session
Resolves build session using a lab ID and optional alias
lab_id
(string), lab_alias
(string, optional)
JSON object with build session details
"Resolve the latest build session for lab LAB123 with alias 'integ'"
update_test_group_code_domains
Updates test group code domains
test_stage
(string), test_group_id
(string), domains
(array)
JSON response
"Update the code domains for test group TG123"
get_test_group_code_domains
Gets code domains for a test group
test_stage
(string), test_group_id
(string)
JSON array
"What code domains are assigned to test group TG123?"
get_test_runs_by_bsid
Gets test runs by build session ID
bs_id
(string), test_stage
(string)
JSON array
"Show me all test runs for build BS123 in the unit test stage"
get_test_runs_by_build_name
Gets test runs by build name
app_name
(string), branch_name
(string), build_name
(string), test_stage
(string)
JSON array
"List all test runs for build 1.0.0 in MyApp's develop branch"
get_test_runs_by_latest_build
Gets test runs for the latest build
app_name
(string), branch_name
(string), test_stage
(string)
JSON array
"Show me test runs for the latest build in MyApp's main branch"
coverage_get_test_runs
Gets test runs for a build
bs_id
(string)
JSON array
"List all test runs for build session BS123"
get_coverage_by_build_name
Gets coverage by build name
app_name
(string), branch_name
(string), build_name
(string)
JSON object
"What's the coverage for build 2.0.0 in MyApp's main branch?"
Reports Tools
Reports tools provide access to various types of reports including custom reports, trend reports, and test gap analysis.
Tool Name
Description
Input Parameters
Output
Example Prompt
report_get_custom_reports
Lists all custom reports
None
JSON array of report data
"What custom reports are available in the system?"
report_download_custom_report
Gets download link for a custom report
report_id
(string)
URL string
"Get me a download link for the weekly coverage report"
report_generate_coverage_trend_report
Generates a coverage trend report
app_name
(string), branch_name
(string), from_date
(string), to_date
(string), various options
JSON object
"Generate a coverage trend report for the main branch from last week to today"
report_generate_group_coverage_trend_report
Generates a group coverage trend report
app_name
(string), branch_name
(string), from_date
(string), to_date
(string), groups
(array)
JSON object
"Create a coverage trend report for the backend group from January to March"
report_create_data_only_quality_trend_report
Creates a quality trend report
app_name
(string), branch_name
(string), from_date
(string), to_date
(string), various options
JSON object
"Generate a quality trend report for the develop branch for Q1"
report_create_tga_report
Creates a Test Gap Analysis report
name
(string), config
(object)
JSON object
"Create a Test Gap Analysis report for MyApp's main branch"
report_search_tga_reports
Searches for existing TGA reports
various filter parameters
JSON array
"Find all Test Gap Analysis reports for the MyApp application"
report_get_tga_report
Gets a specific TGA report
report_id
(string)
JSON object
"Get me the details of TGA report TGA123"
report_get_latest_tga_report
Gets the latest TGA report for an app/branch
app_name
(string), branch_name
(string)
JSON object
"What's the latest Test Gap Analysis report for MyApp's develop branch?"
report_delete_tga_report
Deletes a TGA report
report_id
(string)
JSON response
"Delete the obsolete TGA report TGA123"
report_regenerate_tga_report_template
Regenerates a TGA report template
report_id
(string)
JSON response
"Regenerate the template for TGA report TGA123"
report_download_tga_report_csv
Gets download link for a TGA report CSV
report_id
(string)
URL string
"Give me a CSV download link for TGA report TGA123"
report_create_executive_report_time_range
Creates an executive report for a time range
app_name
(string), branch_name
(string), from_date
(string), to_date
(string), test_stage
(string, optional)
JSON object
"Generate an executive report for MyApp from January to June"
report_create_executive_report_build_range
Creates an executive report for a build range
app_name
(string), branch_name
(string), from_build
(string), to_build
(string), test_stage
(string, optional)
JSON object
"Create an executive report from build 1.0.0 to 2.0.0"
report_download_executive_report_csv
Gets download link for an executive report CSV
report_type
(string), app_name
(string), branch_name
(string), from_value
(string), to_value
(string), test_stage
(string, optional)
URL string
"Download as CSV the executive report for MyApp from Q1 to Q2"
Test Optimization Tools
Test Optimization tools provide access to Test Impact Analysis (TIA) configuration and test execution optimization.
Tool Name
Description
Input Parameters
Output
Example Prompt
optimization_enable_disable_tia
Enables or disables Test Impact Analysis
app_name
(string), branch_name
(string), test_stage
(string), enabled
(boolean)
JSON response
"Enable Test Impact Analysis for the unit tests in MyApp's main branch"
optimization_update_full_run
Updates full run setting for an app/branch
app_name
(string), branch_name
(string), test_stage
(string), full_run
(boolean)
JSON response
"Set the integration tests to run in full mode for the next build"
optimization_update_full_run_bsid
Updates full run setting for a build
bs_id
(string), test_stage
(string), full_run
(boolean)
JSON response
"Set build BS123 to use TIA for unit tests"
optimization_get_executions_status_list
Gets test execution statuses
various filter parameters
JSON array
"Show me the status of recent test executions for MyApp"
optimization_create_test_session
Creates a new test session
test_stage
(string), lab_id
or bs_id
(string), various options
JSON object
"Create a new test session for the unit tests in build BS-123"
optimization_delete_test_session
Deletes a test session
test_session_id
(string)
JSON response
"Delete test session TS123"
optimization_get_exclude_tests_v2
Gets tests to exclude for a session
test_session_id
(string), run_all_tests_on_last_failure
(boolean)
JSON array
"Which tests can I skip in test session TS123?"
optimization_send_test_events
Sends test events for a session
test_session_id
(string), events
(array)
JSON response
"Record these test results for session TS123"
optimization_get_recommended_tests_latest_build
Gets test recommendations for latest build
app_name
(string), branch_name
(string), test_stage
(string)
JSON array
"Which tests should I run for the latest build of MyApp?"
optimization_get_recommended_tests_by_bsid
Gets test recommendations by build ID
bs_id
(string), test_stage
(string)
JSON array
"Which tests should I run for build BS-123?"
optimization_get_recommended_tests_by_build_name
Gets test recommendations by build name
app_name
(string), branch_name
(string), build_name
(string), test_stage
(string)
JSON array
"What tests should I run for build 1.2.0 of MyApp?"
optimization_get_test_runs_by_bsid_v2
Gets test runs by build ID (v2)
bs_id
(string), test_stage
(string)
JSON array
"Show me all test runs for build BS123"
optimization_get_test_runs_by_build_name_v2
Gets test runs by build name (v2)
app_name
(string), branch_name
(string), build_name
(string), test_stage
(string)
JSON array
"List the test runs for build 1.0.0 in MyApp"
optimization_get_test_runs_by_latest_build_v2
Gets test runs for latest build (v2)
app_name
(string), branch_name
(string), test_stage
(string)
JSON array
"What are the test runs for the latest build in MyApp?"
optimization_get_previous_build_for_recalculation
Gets previous build for recalculation
bs_id
(string), test_stage
(string)
JSON object
"Which previous build should I use for recalculating test recommendations?"
optimization_recalc_test_stage_baseline_branch
Recalculates recommendations for a test stage
app_name
(string), branch_name
(string), build_name
(string), test_stage
(string), baseline_branch
(string), baseline_build
(string, optional)
JSON response
"Recalculate test recommendations for build 1.2.3 using the main branch as baseline"
optimization_recalc_all_stages_baseline_branch
Recalculates recommendations for all stages
app_name
(string), branch_name
(string), build_name
(string), baseline_branch
(string), baseline_build
(string, optional)
JSON response
"Recalculate all test recommendations using master as baseline"
optimization_recalc_latest_build_baseline_branch
Recalculates recommendations for latest build
app_name
(string), branch_name
(string), baseline_branch
(string), baseline_build
(string, optional)
JSON response
"Recalculate test recommendations for the latest build using develop as baseline"
optimization_merge_statistical_models
Merges statistical models
app_name
(string), branch_name
(string), test_stage
(string), source_branches
(array)
JSON response
"Merge the statistical models from feature branches into main"
optimization_calibrate_model
Calibrates the statistical model
bs_id
(string), test_stage
(string)
JSON response
"Calibrate the statistical model for build BS123"
optimization_get_auto_branching_configurations
Gets auto-branching configurations
app_name
(string)
JSON array
"Show me the auto-branching configurations for MyApp"
optimization_upsert_auto_branching_configurations
Creates/updates auto-branching configs
app_name
(string), configurations
(array)
JSON response
"Update the auto-branching configurations for MyApp"
optimization_update_auto_branching_configuration
Updates a specific auto-branching config
app_name
(string), config_id
(string), configuration
(object)
JSON response
"Update auto-branching configuration ABC123"
optimization_download_code_to_test_csv
Gets code-to-test mapping as CSV
bs_id
(string), test_stage
(string)
CSV data
"Give me the mapping between code and tests for build BS-123"
optimization_set_recommendation_strategy_by_build
Sets recommendation strategy for a build
app_name
(string), branch_name
(string), build_name
(string), test_stage
(string), strategy
(string)
JSON response
"Set the test recommendation strategy to only run code-changed tests"
optimization_set_recommendation_strategy_by_session
Sets recommendation strategy for a session
test_session_id
(string), strategy
(string)
JSON response
"Change the recommendation strategy for test session TS123"
optimization_set_recommendation_strategy_by_bsid
Sets recommendation strategy by build ID
bs_id
(string), test_stage
(string), strategy
(string)
JSON response
"Set the recommendation strategy for build BS123 to include regression tests"
Common Workflows Tools
Common Workflows tools provide access to cross-cutting functionality like entity tagging and build monitoring.
workflows_list_entity_tags
Lists all tags for an entity
entity_id
(string, optional)
JSON array of tags
"What tags are applied to build 1.2.3?"
workflows_add_entity_tag
Adds a tag to an entity
entity_id
(string), tag
(string)
JSON response
"Tag the failed build 1.2.3 as 'needs-investigation'"
workflows_remove_entity_tag
Removes a tag from an entity
entity_id
(string), tag
(string)
JSON response
"Remove the 'in-progress' tag from build 1.2.3"
workflow_create_entity_tagging_exact_match_rule
Creates a tagging rule with exact matches
entity_type
(string), rule_name
(string), exact_matches
(array), tags
(array), various options
JSON response
"Create a rule to tag builds with 'production' if they're from the main branch"
workflow_create_entity_tagging_query_rule
Creates a tagging rule with query criteria
entity_type
(string), rule_name
(string), query
(object), tags
(array), various options
JSON response
"Create a complex rule to tag builds based on multiple conditions"
workflow_tag_build
Adds or updates tags for a build
app_name
(string), branch_name
(string), build_name
(string), tags
(object)
JSON response
"Tag build 1.2.3 in MyApp as 'stable' and 'verified'"
workflow_delete_tag_from_build
Deletes a tag from a build
app_name
(string), branch_name
(string), build_name
(string), tag
(string)
JSON response
"Remove the 'experimental' tag from build 1.2.3"
workflow_filter_builds_by_tags
Filters builds by tags
app_name
(string), tags
(array), various options
JSON array
"Find all builds in MyApp tagged with both 'release' and 'tested'"
workflow_create_and_monitor_build
Creates and monitors a build
app_name
(string), branch_name
(string), build_name
(string), build_data
(object), various options
JSON object
"Start a new build 2.0.1 for MyApp and monitor its progress"
workflow_setup_quality_gates
Sets up quality gates
app_name
(string), branch_name
(string), gates
(object)
JSON response
"Set up the standard quality gates for our new application"
workflow_analyze_test_gap
Runs a test gap analysis
app_name
(string), branch_name
(string), params
(object), various options
JSON response
"Run a test gap analysis for the latest build in MyApp's develop branch"
Executions Tools
Executions tools provide access to test and build execution management, including creating executions, updating their status, and retrieving execution metrics.
executions_get_latest
Get the latest executions for a specific application and branch
app_name
(string), branch_name
(string), limit
(integer, optional)
JSON array of executions
"Show me the 5 most recent executions for MyApp's main branch"
executions_get_by_id
Get details for a specific execution by ID
execution_id
(string)
JSON object
"What are the details of execution EX123?"
executions_create
Create a new execution for a specific build
app_name
(string), branch_name
(string), build_name
(string), execution_type
(string), metadata
(object, optional)
JSON object
"Create a new test execution for build 1.2.3 of MyApp"
executions_update_status
Update the status of an execution
execution_id
(string), status
(string), status_details
(object, optional)
JSON object
"Update execution EX123 status to 'completed'"
executions_get_metrics
Get metrics for a specific execution
execution_id
(string)
JSON object
"What are the performance metrics for execution EX123?"
executions_open_by_lab_id
Open a test execution by lab ID
app_name
(string), branch_name
(string), build_name
(string), lab_id
(string), test_stage
(string), test_group_id
(string, optional)
Server response text
"Open a test execution for build 1.2.3 in lab LAB123 for the unit_test stage"
executions_close_by_lab_id
Close a test execution by lab ID
lab_id
(string)
Server response text
"Close the test execution for lab LAB123"
Utility Tools
Utility tools provide general-purpose functionality that can be used across various workflows.
time_convert_to_unix_ms
Convert a time string to Unix epoch milliseconds
time_string
(string) - A string representing a time in various formats including absolute dates, "now", "today", "yesterday", and relative times like "2 days ago"
Integer representing Unix epoch time in milliseconds
"Convert 'yesterday at noon' to Unix timestamp"
time_convert_from_unix_ms
Convert Unix epoch milliseconds to a formatted datetime string
unix_ms
(integer) - Unix epoch time in milliseconds, format_string
(string, optional) - Format string for the output (e.g., "%Y-%m-%d %H:%M:%S")
Formatted datetime string
"Convert 1617235200000 to a readable date"
Lab IDs
Get Lab IDs
async def get_lab_ids(
build_type: str = "integration",
app_name: Optional[str] = None,
branch_name: Optional[str] = None,
) -> str
Get a list of lab IDs with optional filtering.
Parameters:
build_type
(str, optional): Type of build to filter by. Currently only "integration" is supported. If "component" is provided, an empty list will be returned. Defaults to "integration".app_name
(str, optional): App name to filter by.branch_name
(str, optional): Branch name to filter by.
Returns: A JSON string containing:
appName
: Searched app name (only if queried with appName)branchName
: Searched branch name (only if queried with branchName)buildType
: Searched buildTypelabIds
: List of lab ID objects, each containing:labId
: Lab IDappName
: App name (only if 'appName' wasn't provided in query)branchName
: Branch name (only if 'branchName' wasn't provided in query)labAlias
: Lab alias namecdOnly
: Whether the lab is only for Continuous Deployment
Example:
# Get all integration lab IDs
response = await client.get_lab_ids()
# Get integration lab IDs for a specific app
response = await client.get_lab_ids(app_name="MyApp")
# Get integration lab IDs for a specific app and branch
response = await client.get_lab_ids(
app_name="MyApp",
branch_name="main"
)
Note: Currently only build_type="integration"
is supported. If build_type="component"
is provided, an empty list will be returned. This is a placeholder for future implementation which will also support component builds.
Resolve Build Session
async def resolve_build_session(
lab_id: str,
lab_alias: Optional[str] = None
) -> str
Resolve build session using a lab ID and an optional alias.
This endpoint should be used only when linking the test runner and the test listener using lab ID. The BSID that is returned is the one resolved at the time the latest tests stage was run. If a test stage has not run yet against this lab ID it will return a status code 404 with the error 4000 - "not found".
Parameters:
lab_id
(str): Lab ID to resolve build session forlab_alias
(str, optional): Optional alias to filter by
Returns: A JSON string containing:
alias
: alias used in the filterbuildSession
: BuildSession object containing:appName
: Name of the build's appbranchName
: Name of the build's branchbuildName
: Name of the buildbsid
: Build Session ID
Example:
# Resolve build session for a lab ID
response = await client.resolve_build_session("integ_lab123")
# Resolve build session for a lab ID with alias
response = await client.resolve_build_session("integ_lab123", lab_alias="integ")
Note: This endpoint will return a 404 error with code 4000 if no test stage has run yet against the specified lab ID.
Last updated
Was this helpful?