get_project
Retrieve detailed project information, including settings, integrations, and configuration, using the specified Project ID. Ideal for managing and monitoring projects within the Coroot observability platform.
Instructions
Get project details and configuration.
Retrieves comprehensive information about a project including its settings, integrations, and configuration.
Args: project_id: Project ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes |
Implementation Reference
- src/mcp_coroot/server.py:172-182 (handler)MCP tool handler for 'get_project'. Decorated with @mcp.tool() for automatic registration and FastMCP schema inference from signature and docstring. Calls the implementation helper.@mcp.tool() async def get_project(project_id: str) -> dict[str, Any]: """Get project details and configuration. Retrieves comprehensive information about a project including its settings, integrations, and configuration. Args: project_id: Project ID """ return await get_project_impl(project_id) # type: ignore[no-any-return]
- src/mcp_coroot/server.py:163-170 (helper)Implementation helper function that invokes the CorootClient to fetch project details and formats the success response.async def get_project_impl(project_id: str) -> dict[str, Any]: """Get project details.""" project = await get_client().get_project(project_id) return { "success": True, "project": project, }
- src/mcp_coroot/client.py:302-313 (helper)CorootClient method that performs the actual HTTP GET request to the Coroot API endpoint /api/project/{project_id} to retrieve project details.async def get_project(self, project_id: str) -> dict[str, Any]: """Get project details. Args: project_id: Project ID. Returns: Project configuration dictionary. """ response = await self._request("GET", f"/api/project/{project_id}") data: dict[str, Any] = response.json() return data
- src/mcp_coroot/server.py:172-172 (registration)The @mcp.tool() decorator registers the get_project function as an MCP tool with FastMCP, inferring input schema from type hints and docstring.@mcp.tool()
- src/mcp_coroot/server.py:93-112 (helper)Global client factory used by tool implementations to lazily initialize the shared CorootClient instance.def get_client() -> CorootClient: """Get or create the client instance. Raises: ValueError: If no credentials are configured. """ global _client if _client is None: try: _client = CorootClient() except ValueError as e: # Re-raise with more context raise ValueError( "Coroot credentials not configured. " "Please set COROOT_BASE_URL and either:\n" " - COROOT_USERNAME and COROOT_PASSWORD for automatic login\n" " - COROOT_SESSION_COOKIE for direct authentication\n" " - COROOT_API_KEY for data ingestion endpoints" ) from e return _client