testmo_append_automation_run
Append test artifacts, custom fields, or links to an existing automation run to add or update test data.
Instructions
Append test artifacts, fields, or links to an existing automation run.
Args: automation_run_id: The automation run ID. artifacts: External test artifacts to append. fields: Custom fields to append. links: Links to append.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| automation_run_id | Yes | ||
| artifacts | No | ||
| fields | No | ||
| links | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- testmo/tools/automation.py:177-201 (handler)The main tool handler for testmo_append_automation_run. An async function decorated with @mcp.tool() that accepts an automation_run_id and optional artifacts, fields, and links. It builds a data dict and sends a POST request to /automation/runs/{automation_run_id}/append.
@mcp.tool() async def testmo_append_automation_run( automation_run_id: int, artifacts: list[dict[str, Any]] | None = None, fields: list[dict[str, Any]] | None = None, links: list[dict[str, Any]] | None = None, ) -> dict[str, Any]: """Append test artifacts, fields, or links to an existing automation run. Args: automation_run_id: The automation run ID. artifacts: External test artifacts to append. fields: Custom fields to append. links: Links to append. """ data: dict[str, Any] = {} if artifacts: data["artifacts"] = artifacts if fields: data["fields"] = fields if links: data["links"] = links return await _request( "POST", f"/automation/runs/{automation_run_id}/append", data=data ) - testmo/tools/automation.py:177-177 (registration)The tool is registered via the @mcp.tool() decorator on line 177 from the shared FastMCP instance (imported from ..server as mcp). The module is imported in testmo-mcp.py on line 17.
@mcp.tool() - testmo/tools/automation.py:177-201 (schema)Input schema defined via type annotations: automation_run_id (int), artifacts (list[dict] | None), fields (list[dict] | None), links (list[dict] | None). Return type is dict[str, Any]. Docstring serves as the description for the AI.
@mcp.tool() async def testmo_append_automation_run( automation_run_id: int, artifacts: list[dict[str, Any]] | None = None, fields: list[dict[str, Any]] | None = None, links: list[dict[str, Any]] | None = None, ) -> dict[str, Any]: """Append test artifacts, fields, or links to an existing automation run. Args: automation_run_id: The automation run ID. artifacts: External test artifacts to append. fields: Custom fields to append. links: Links to append. """ data: dict[str, Any] = {} if artifacts: data["artifacts"] = artifacts if fields: data["fields"] = fields if links: data["links"] = links return await _request( "POST", f"/automation/runs/{automation_run_id}/append", data=data ) - testmo-mcp.py:17-23 (registration)The top-level entry point that imports the automation module (which contains the tool). The import triggers the @mcp.tool() decorator to register all tools in that module on the FastMCP instance.
import testmo.tools.automation # noqa: F401 import testmo.tools.issues # noqa: F401 import testmo.tools.composite # noqa: F401 import testmo.tools.utility # noqa: F401 if __name__ == "__main__": mcp.run(transport="stdio")