testmo_get_issue_connection
Fetch details of a specific issue connection by its ID, with optional expanded related entities.
Instructions
Get details of a specific issue connection.
Args: connection_id: The issue connection ID. expands: Related entities to include.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection_id | Yes | ||
| expands | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- testmo/tools/issues.py:41-60 (handler)The handler function for the testmo_get_issue_connection tool. Makes a GET request to /issues/connections/{connection_id} to retrieve details of a specific issue connection.
@mcp.tool() async def testmo_get_issue_connection( connection_id: int, expands: list[str] | None = None, ) -> dict[str, Any]: """Get details of a specific issue connection. Args: connection_id: The issue connection ID. expands: Related entities to include. """ params: dict[str, Any] = {} if expands: params["expands"] = ",".join(expands) result = await _request( "GET", f"/issues/connections/{connection_id}", params=params if params else None, ) return result.get("result", result) - testmo/tools/issues.py:43-44 (schema)Input parameters for the tool: connection_id (int, required) and expands (list[str], optional).
connection_id: int, expands: list[str] | None = None, - testmo/tools/issues.py:41-42 (registration)Registered as an MCP tool via the @mcp.tool() decorator on the FastMCP instance from testmo/server.py.
@mcp.tool() async def testmo_get_issue_connection( - testmo-mcp.py:18-18 (registration)Top-level entry point imports testmo.tools.issues to trigger registration of all issue tools (including testmo_get_issue_connection) on the mcp instance.
import testmo.tools.issues # noqa: F401 - testmo/client.py:25-49 (helper)The _request helper function used to make the HTTP GET request 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()