Skip to main content
Glama

testmo_list_automation_runs

List automation runs in a project with filters by source, milestone, status, creation date, and tags.

Instructions

List automation runs in a project with optional filters.

Args: project_id: The project ID. source_id: Comma-separated automation source IDs to filter by. milestone_id: Comma-separated milestone IDs to filter by. status: Comma-separated status values (2=Success, 3=Failure, 4=Running). created_after: Filter runs created after (ISO8601 format). created_before: Filter runs created before (ISO8601 format). tags: Comma-separated tags to filter by. page: Page number (default: 1). per_page: Results per page (default: 100). Valid: 25, 50, 100. expands: Related entities to include.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
source_idNo
milestone_idNo
statusNo
created_afterNo
created_beforeNo
tagsNo
pageNo
per_pageNo
expandsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'testmo_list_automation_runs' tool. Decorated with @mcp.tool(), it accepts project_id and optional filters (source_id, milestone_id, status, created_after, created_before, tags, page, per_page, expands), builds query params, and makes a GET request to /projects/{project_id}/automation/runs.
    @mcp.tool()
    async def testmo_list_automation_runs(
        project_id: int,
        source_id: str | None = None,
        milestone_id: str | None = None,
        status: str | None = None,
        created_after: str | None = None,
        created_before: str | None = None,
        tags: str | None = None,
        page: int = 1,
        per_page: int = 100,
        expands: list[str] | None = None,
    ) -> dict[str, Any]:
        """List automation runs in a project with optional filters.
    
        Args:
            project_id: The project ID.
            source_id: Comma-separated automation source IDs to filter by.
            milestone_id: Comma-separated milestone IDs to filter by.
            status: Comma-separated status values (2=Success, 3=Failure, 4=Running).
            created_after: Filter runs created after (ISO8601 format).
            created_before: Filter runs created before (ISO8601 format).
            tags: Comma-separated tags to filter by.
            page: Page number (default: 1).
            per_page: Results per page (default: 100). Valid: 25, 50, 100.
            expands: Related entities to include.
        """
        params: dict[str, Any] = {"page": page, "per_page": per_page}
        if source_id:
            params["source_id"] = source_id
        if milestone_id:
            params["milestone_id"] = milestone_id
        if status:
            params["status"] = status
        if created_after:
            params["created_after"] = created_after
        if created_before:
            params["created_before"] = created_before
        if tags:
            params["tags"] = tags
        if expands:
            params["expands"] = ",".join(expands)
        return await _request(
            "GET", f"/projects/{project_id}/automation/runs", params=params
        )
  • Registration via @mcp.tool() decorator on the async function testmo_list_automation_runs. The 'mcp' instance is imported from testmo/server.py (line 3).
    @mcp.tool()
  • Input schema defined via type-annotated parameters: project_id (int), source_id (str|None), milestone_id (str|None), status (str|None), created_after (str|None), created_before (str|None), tags (str|None), page (int, default 1), per_page (int, default 100), expands (list[str]|None).
    async def testmo_list_automation_runs(
        project_id: int,
        source_id: str | None = None,
        milestone_id: str | None = None,
        status: str | None = None,
        created_after: str | None = None,
        created_before: str | None = None,
        tags: str | None = None,
        page: int = 1,
        per_page: int = 100,
        expands: list[str] | None = None,
    ) -> dict[str, Any]:
  • testmo-mcp.py:17-18 (registration)
    Indirect registration: the top-level entry point imports testmo.tools.automation (which triggers @mcp.tool() decorator execution), ensuring the tool is registered on the FastMCP server.
    import testmo.tools.automation  # noqa: F401
    import testmo.tools.issues  # noqa: F401
  • The _request helper function used by the handler to make authenticated HTTP requests 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()
Behavior2/5

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

No annotations provided, so the description carries full burden. It only implies a read operation via 'List', but no explicit statement about safety, no mention of rate limits, ordering, or side effects.

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

Conciseness4/5

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

Concise overall: purpose in first sentence followed by bullet-like parameter list. Could be more structured with headings or clearer separation, but no wasted words.

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?

With 10 parameters, no annotations, and an output schema, the description is adequate but missing context like prerequisites, relationship to sibling tools, or return behavior. The required project_id is noted in args, but no guidance on sorting or large result sets.

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

Parameters4/5

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

Schema description coverage is 0%, but the description adds meaningful details for each parameter (e.g., status values, date format, per_page options). This compensates well for the lack of schema descriptions.

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 clearly states the action ('List') and resource ('automation runs') with filters, and the name 'testmo_list_automation_runs' is unambiguous. It distinguishes from sibling list tools like testmo_list_runs and testmo_get_automation_run.

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

Usage Guidelines3/5

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

No explicit guidance on when to use this tool versus alternatives like testmo_list_runs or testmo_get_automation_run. The description implies usage for listing runs with filters, but lacks when-not and alternatives.

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