Skip to main content
Glama

get_application

Retrieve detailed application metrics, health checks, incidents, and deployment history for monitoring and analysis using specified project and application IDs.

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
app_idYes
from_timestampNo
project_idYes
to_timestampNo

Implementation Reference

  • Core handler function that performs URL encoding on app_id, calls CorootClient.get_application to fetch application metrics and details, and formats the success response with error handling decorator.
    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 using @mcp.tool() decorator. This thin wrapper function defines the tool interface, parameters, and docstring serving as schema documentation, delegating to the impl function.
    @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 CorootClient method that makes the HTTP GET request to the Coroot API endpoint /api/project/{project_id}/app/{app_id} with optional time range parameters and returns the raw JSON response.
    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

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