Skip to main content
Glama

get_application

Retrieve application details and performance metrics including CPU, memory, network data, health checks, SLOs, incidents, and deployment history from the Coroot observability platform.

Instructions

Get application details and metrics.

Retrieves comprehensive information about an application including:

  • Performance metrics (CPU, memory, network)

  • Health checks and SLOs

  • Recent incidents

  • Deployment history

Args: project_id: Project ID app_id: Application ID (format: namespace/kind/name) from_timestamp: Start timestamp for metrics (optional) to_timestamp: End timestamp for metrics (optional)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
app_idYes
from_timestampNo
to_timestampNo

Implementation Reference

  • Core handler implementing the tool logic: URL-encodes app_id and delegates to CorootClient.get_application to fetch application details and metrics.
    async def get_application_impl( project_id: str, app_id: str, from_timestamp: int | None = None, to_timestamp: int | None = None, ) -> dict[str, Any]: """Get application details and metrics.""" # URL encode the app_id since it contains slashes encoded_app_id = quote(app_id, safe="") app = await get_client().get_application( project_id, encoded_app_id, from_timestamp, to_timestamp ) return { "success": True, "application": app, }
  • MCP tool registration via @mcp.tool() decorator. Defines the tool interface, parameters (serving as input schema), and comprehensive docstring describing usage and output.
    @mcp.tool() async def get_application( project_id: str, app_id: str, from_timestamp: int | None = None, to_timestamp: int | None = None, ) -> dict[str, Any]: """Get application details and metrics. Retrieves comprehensive information about an application including: - Performance metrics (CPU, memory, network) - Health checks and SLOs - Recent incidents - Deployment history Args: project_id: Project ID app_id: Application ID (format: namespace/kind/name) from_timestamp: Start timestamp for metrics (optional) to_timestamp: End timestamp for metrics (optional) """ return await get_application_impl( # type: ignore[no-any-return] project_id, app_id, from_timestamp, to_timestamp )
  • Supporting client method in CorootClient that makes the HTTP GET request to the Coroot API to retrieve application data, handling query parameters for time range.
    async def get_application( self, project_id: str, app_id: str, from_timestamp: int | None = None, to_timestamp: int | None = None, ) -> dict[str, Any]: """Get application details and metrics. Args: project_id: Project ID. app_id: Application ID (format: namespace/kind/name). from_timestamp: Start timestamp for metrics. to_timestamp: End timestamp for metrics. Returns: Application metrics and information. """ params = {} if from_timestamp: params["from"] = str(from_timestamp) if to_timestamp: params["to"] = str(to_timestamp) response = await self._request( "GET", f"/api/project/{project_id}/app/{app_id}", params=params, ) data: dict[str, Any] = response.json() return data
  • Utility function to lazily initialize and retrieve the shared CorootClient instance used by all MCP tools.
    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

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/jamesbrink/mcp-coroot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server