Skip to main content
Glama

testmo_list_milestones

List all milestones in a Testmo project, with optional filters by completion status and pagination to organize releases and track progress.

Instructions

List all milestones in a project (e.g., release/5.2.0).

Args: project_id: The project ID. is_completed: Filter by completion status (optional). 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
is_completedNo
pageNo
per_pageNo
expandsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function `testmo_list_milestones` is decorated with @mcp.tool() and implements the tool logic: accepts project_id, is_completed, page, per_page, expands parameters; builds query params; and calls the Testmo API GET /projects/{project_id}/milestones via the _request helper.
    @mcp.tool()
    async def testmo_list_milestones(
        project_id: int,
        is_completed: bool | None = None,
        page: int = 1,
        per_page: int = 100,
        expands: list[str] | None = None,
    ) -> dict[str, Any]:
        """List all milestones in a project (e.g., release/5.2.0).
    
        Args:
            project_id: The project ID.
            is_completed: Filter by completion status (optional).
            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 is_completed is not None:
            params["is_completed"] = is_completed
        if expands:
            params["expands"] = ",".join(expands)
        return await _request("GET", f"/projects/{project_id}/milestones", params=params)
  • Imports: `_request` from the client module (used for API calls) and `mcp` from server (the FastMCP instance).
    from typing import Any
    
    from ..server import mcp
    from ..client import _request
  • Registration via `@mcp.tool()` decorator on line 7, which registers `testmo_list_milestones` as an MCP tool on the FastMCP instance created in server.py.
    @mcp.tool()
  • testmo-mcp.py:13-13 (registration)
    The `import testmo.tools.milestones` in the entry point ensures the tool module is loaded, triggering the @mcp.tool() decorator registration.
    import testmo.tools.milestones  # 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 are provided, and the description does not disclose behavioral traits such as whether the operation is read-only, pagination limits (though schema shows defaults), or any 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.

Conciseness5/5

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

The description is concise with a clear purpose statement and a structured list of parameters. No redundant information, every sentence adds value.

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

Completeness4/5

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

Given 5 parameters and an output schema, the description covers all essential aspects: required project_id, optional filters, pagination, and expands. It lacks details on return format but output schema handles that. Missing guidance on when to use among similar list tools.

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?

The description adds meaning to all parameters beyond the schema: 'Filter by completion status' for is_completed, 'Page number' and 'Results per page with valid values' for pagination, and 'Related entities to include' for expands. This compensates for the 0% schema description coverage.

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 'List all milestones in a project' with an example, making the verb and resource explicit. It distinguishes from sibling tools like 'get_milestone' (single) and 'list_projects' (different resource).

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 like 'list_runs' or 'get_milestone'. It doesn't specify any prerequisites or context for usage.

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