testmo_create_automation_run_thread
Create a thread in an automation run to enable parallel test execution lanes for submitting test results.
Instructions
Create a new thread in an automation run for submitting test results.
Threads represent parallel test execution lanes. After creating, use testmo_append_automation_run_thread to submit test results.
Args: automation_run_id: The automation run ID. elapsed_observed: Observed execution time in microseconds. elapsed_computed: Computed execution time in microseconds. artifacts: External test artifacts for the thread. fields: Custom fields for the thread.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| automation_run_id | Yes | ||
| elapsed_observed | No | ||
| elapsed_computed | No | ||
| artifacts | No | ||
| fields | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- testmo/tools/automation.py:225-258 (handler)The tool handler function that creates a new thread in an automation run. Builds a request body with optional elapsed_observed, elapsed_computed, artifacts, and fields, then sends a POST request to /automation/runs/{automation_run_id}/threads.
@mcp.tool() async def testmo_create_automation_run_thread( automation_run_id: int, elapsed_observed: int | None = None, elapsed_computed: int | None = None, artifacts: list[dict[str, Any]] | None = None, fields: list[dict[str, Any]] | None = None, ) -> dict[str, Any]: """Create a new thread in an automation run for submitting test results. Threads represent parallel test execution lanes. After creating, use testmo_append_automation_run_thread to submit test results. Args: automation_run_id: The automation run ID. elapsed_observed: Observed execution time in microseconds. elapsed_computed: Computed execution time in microseconds. artifacts: External test artifacts for the thread. fields: Custom fields for the thread. """ data: dict[str, Any] = {} if elapsed_observed is not None: data["elapsed_observed"] = elapsed_observed if elapsed_computed is not None: data["elapsed_computed"] = elapsed_computed if artifacts: data["artifacts"] = artifacts if fields: data["fields"] = fields return await _request( "POST", f"/automation/runs/{automation_run_id}/threads", data=data if data else None, ) - testmo/tools/automation.py:225-225 (registration)Registers testmo_create_automation_run_thread as an MCP tool on the FastMCP instance. The @mcp.tool() decorator from testmo/server.py (line 6: mcp = FastMCP('testmo-mcp')) registers this handler.
@mcp.tool() - testmo/tools/automation.py:233-244 (handler)Docstring describing the function: creates a thread in an automation run for parallel test execution, referencing testmo_append_automation_run_thread for submitting results.
"""Create a new thread in an automation run for submitting test results. Threads represent parallel test execution lanes. After creating, use testmo_append_automation_run_thread to submit test results. Args: automation_run_id: The automation run ID. elapsed_observed: Observed execution time in microseconds. elapsed_computed: Computed execution time in microseconds. artifacts: External test artifacts for the thread. fields: Custom fields for the thread. """ - testmo/tools/automation.py:227-231 (schema)Type-annotated parameter definitions serve as the input schema for the tool, with optional elapsed, artifacts, and fields parameters.
automation_run_id: int, elapsed_observed: int | None = None, elapsed_computed: int | None = None, artifacts: list[dict[str, Any]] | None = None, fields: list[dict[str, Any]] | None = None,