Skip to main content
Glama

testmo_complete_automation_run_thread

Complete an automation run thread by providing its ID. Optionally include observed and computed execution times in microseconds.

Instructions

Mark an automation run thread as completed.

Args: thread_id: The automation run thread ID to complete. elapsed_observed: Observed execution time in microseconds. elapsed_computed: Computed execution time in microseconds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thread_idYes
elapsed_observedNo
elapsed_computedNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool handler function 'testmo_complete_automation_run_thread' that marks an automation run thread as completed via a POST request to the Testmo API.
    @mcp.tool()
    async def testmo_complete_automation_run_thread(
        thread_id: int,
        elapsed_observed: int | None = None,
        elapsed_computed: int | None = None,
    ) -> dict[str, Any]:
        """Mark an automation run thread as completed.
    
        Args:
            thread_id: The automation run thread ID to complete.
            elapsed_observed: Observed execution time in microseconds.
            elapsed_computed: Computed execution time in microseconds.
        """
        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
        return await _request(
            "POST",
            f"/automation/runs/threads/{thread_id}/complete",
            data=data if data else None,
        )
  • The '@mcp.tool()' decorator registers this async function as an MCP tool named 'testmo_complete_automation_run_thread'.
    @mcp.tool()
    async def testmo_complete_automation_run_thread(
  • Input parameters: thread_id (int, required), elapsed_observed (int, optional), elapsed_computed (int, optional). Output type is dict[str, Any].
    async def testmo_complete_automation_run_thread(
        thread_id: int,
        elapsed_observed: int | None = None,
        elapsed_computed: int | None = None,
    ) -> dict[str, Any]:
  • The '_request' helper function that handles the actual HTTP call to the Testmo API.
    async def _request(
        method: str,
        endpoint: str,
        data: dict[str, Any] | None = None,
        params: dict[str, Any] | None = None,
    ) -> dict[str, Any]:
        async with _get_client() as client:
            response = await client.request(
                method=method,
                url=endpoint,
                json=data,
                params=params,
            )
            if response.status_code == 204:
                return {"success": True}
            if response.status_code >= 400:
                try:
                    error_body = response.json()
                except Exception:
                    error_body = response.text
                raise RuntimeError(
                    f"Testmo API error {response.status_code}: "
                    f"{json.dumps(error_body) if isinstance(error_body, dict) else error_body}"
                )
            return response.json()
  • The 'mcp' FastMCP server instance that provides the '@mcp.tool()' decorator for registration.
    mcp = FastMCP("testmo-mcp")
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose behavioral traits such as whether the action is destructive, whether it requires authentication, or what happens if the thread is already completed. The description merely states the action without additional context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise: a one-sentence purpose followed by a structured Args block. No redundant information. Efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the basic purpose and parameters, but lacks usage context (e.g., prerequisites, return value, effect on related state). For a simple completion tool, it is adequate but not thorough.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description lists parameters and provides brief explanations (e.g., 'thread_id: The automation run thread ID to complete'), adding meaning beyond the schema titles. However, with 0% schema description coverage, it only partially compensates, as explanations are minimal and do not include format or validation details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action ('Mark as completed') on a specific resource ('automation run thread'), clearly distinguishing it from siblings like 'testmo_complete_automation_run' and 'testmo_create_automation_run_thread'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. The description does not provide context about prerequisites, when not to use it, or how it differs from other completion tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/strelec00/testmo-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server