testmo_get_web_url
Generate a web URL to view a Testmo resource based on project, type, and ID.
Instructions
Generate a web URL for viewing a resource in Testmo.
Args: project_id: The project ID. resource_type: Type of resource (repositories, runs). resource_id: Resource ID (e.g., folder ID).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | ||
| resource_type | No | repositories | |
| resource_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- testmo/tools/utility.py:18-34 (handler)The handler function for the testmo_get_web_url tool. It generates a web URL for viewing a resource (repositories, runs) in Testmo, optionally scoped by a group/resource ID.
@mcp.tool() async def testmo_get_web_url( project_id: int, resource_type: str = "repositories", resource_id: int | None = None, ) -> dict[str, str]: """Generate a web URL for viewing a resource in Testmo. Args: project_id: The project ID. resource_type: Type of resource (repositories, runs). resource_id: Resource ID (e.g., folder ID). """ url = f"{TESTMO_URL}/{resource_type}/{project_id}" if resource_id: url += f"?group_id={resource_id}" return {"url": url} - testmo/tools/utility.py:19-22 (schema)Function signature with typed parameters: project_id (int), resource_type (str, default 'repositories'), resource_id (int or None), and return type dict[str, str].
async def testmo_get_web_url( project_id: int, resource_type: str = "repositories", resource_id: int | None = None, - testmo/tools/utility.py:18-18 (registration)Registered as an MCP tool via the @mcp.tool() decorator on the FastMCP instance defined in testmo/server.py.
@mcp.tool() - testmo/tools/utility.py:4-5 (helper)Imports TESTMO_URL from config.py, which is used by the handler to construct the web URL.
from ..config import FIELD_MAPPINGS, TESTMO_URL