product: maestro audience: test-developer, operator, ai-assistant authority: normative
MCP Tools — Test Execution
Tools for starting, monitoring, and aborting test runs.
All tool responses include a top-level station field containing the StationLabel
configured for this server instance.
See also:
tools-reference.mdfor the full tool index.
start_test
Start a test execution from a YAML file path.
⚠️ A station accepts at most
MaxParallelExecutionsconcurrent tests (default 1). By default a station runs a single test at a time. Callingstart_testwhen the station is at capacity returns409 Conflict("Station at capacity").If asked to run a test multiple times (e.g. "run 10 times and report the average"), run them sequentially unless you know the station allows parallelism:
- Call
start_test- Wait for it to finish — use
wait_for_test_completionor pollget_test_statusuntilverdictis no longerRUNNING- Repeat from step 1
On a parallel station (
MaxParallelExecutions > 1) you may start additional tests up to the limit; each runs independently. Steps that share an instrument must declarerequires:(seeyaml/runtime-control.md).
| Parameter | Type | Required | Description |
|---|---|---|---|
yamlFilePath |
string | Yes | Absolute path to the .yaml file on the API server. Use list_available_tests or get_available_test_files to discover valid paths |
serialNumber |
string | Yes | The device under test serial number. Stored with the result |
operatorId |
string | No | The operator running the test. Stored with the result |
unattendedMode |
bool | No | When true, prompt steps auto-respond without human input. See unattended-mode.md |
Returns: execution — executionId, testName, status, startTime
Calls: POST /api/testexecution/run
Error — 409 Conflict: Returned when the station is at capacity (all
MaxParallelExecutions slots in use). Response body contains activeCount and
maxParallel. Wait for a slot to free up, or call abort_test on a running execution.
Note: The
executionIdin the response is the GUID you pass to all other execution tools (get_test_status,abort_test,get_execution_log, etc.).
get_test_status
Returns the current status and header details of a test execution.
| Parameter | Type | Required | Description |
|---|---|---|---|
executionId |
GUID | Yes | The execution ID returned by start_test |
Returns: result — full TestResultDetailDto including verdict, stepCount, child executions, artifacts
Calls: GET /api/test-results/{id}
abort_test
Signals the running test executor to stop at the next safe point.
| Parameter | Type | Required | Description |
|---|---|---|---|
executionId |
GUID | Yes | The execution ID to abort |
Returns: message confirming the abort signal was sent
Calls: POST /api/testexecution/{executionId}/abort
Note: Abort is asynchronous. The execution transitions to
ABORTEDverdict after the current step finishes. Pollget_test_statusto confirm.
wait_for_test_completion
Polls a test execution until it reaches a terminal state, then returns the full result.
Use this instead of repeatedly calling get_test_status manually.
| Parameter | Type | Required | Description |
|---|---|---|---|
executionId |
GUID | Yes | The execution ID to wait for |
timeoutSeconds |
int | No | Maximum seconds to wait before throwing a timeout error. Default: 300 |
Returns: result — same as get_test_status once the execution is complete
Throws: TimeoutException if the execution does not complete within timeoutSeconds
list_available_tests
Lists all YAML test files available from installed (activated) packages.
| Parameter | Type | Required | Description |
|---|---|---|---|
| (none) |
Returns: tests[] — each item has packageName, testName, filePath, requiredTags
Calls: GET /api/packages/test-files
validate_yaml
Validates YAML test content without executing it. Use before committing a new test.
| Parameter | Type | Required | Description |
|---|---|---|---|
yamlContent |
string | Yes | The raw YAML string to validate |
Returns: validation.isValid (bool), validation.errors[] — each error has a message and line number
Calls: POST /api/yaml/validate
get_execution_log
Returns log messages for a test execution as a flat list of strings.
| Parameter | Type | Required | Description |
|---|---|---|---|
executionId |
GUID | Yes | The execution ID |
Returns: logs[] — plain message strings in chronological order
Calls: GET /api/test-results/{id}/logs
To get structured log entries (with timestamps, step names, log levels), use
get_execution_logsintools-reports.mdinstead.
check_mes_routing
Queries the MES for routing information for a serial number. Tells you whether testing is allowed on this station and which test options are available.
| Parameter | Type | Required | Description |
|---|---|---|---|
serialNumber |
string | Yes | The serial number to check |
Returns: routing.isKnown, routing.options[], routing.rejectionReason (if blocked)
Calls: GET /api/mes/routing?serialNumber={sn}
When the station is not connected to a real MES, the API uses
AllowAllMesServicewhich returnsisKnown: truewith an empty options list. Testing is always allowed.