Skip to main content
Glama
jamesbrink

MCP Server for Coroot

get_application_logs

Retrieve application logs with pattern detection and filtering by time range, search query, and severity level for monitoring and troubleshooting.

Instructions

Get application logs with pattern analysis.

Retrieves application logs with automatic pattern detection and grouping. Supports filtering by time range, search query, and severity level.

Args: project_id: Project ID app_id: Application ID (format: namespace/kind/name) from_timestamp: Start timestamp (optional) to_timestamp: End timestamp (optional) query: Log search query (optional) severity: Filter by severity level (optional)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
app_idYes
from_timestampNo
to_timestampNo
queryNo
severityNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Primary MCP tool handler for get_application_logs, registered via @mcp.tool() decorator. Defines input schema via type hints and docstring, calls implementation function.
    async def get_application_logs(
        project_id: str,
        app_id: str,
        from_timestamp: int | None = None,
        to_timestamp: int | None = None,
        query: str | None = None,
        severity: str | None = None,
    ) -> dict[str, Any]:
        """Get application logs with pattern analysis.
    
        Retrieves application logs with automatic pattern detection
        and grouping. Supports filtering by time range, search query,
        and severity level.
    
        Args:
            project_id: Project ID
            app_id: Application ID (format: namespace/kind/name)
            from_timestamp: Start timestamp (optional)
            to_timestamp: End timestamp (optional)
            query: Log search query (optional)
            severity: Filter by severity level (optional)
        """
        return await get_application_logs_impl(  # type: ignore[no-any-return]
            project_id, app_id, from_timestamp, to_timestamp, query, severity
        )
  • Core handler implementation that encodes the app_id and invokes the CorootClient to fetch application logs from the API.
    @handle_errors
    async def get_application_logs_impl(
        project_id: str,
        app_id: str,
        from_timestamp: int | None = None,
        to_timestamp: int | None = None,
        query: str | None = None,
        severity: str | None = None,
    ) -> dict[str, Any]:
        """Get application logs."""
        # URL encode the app_id since it contains slashes
        encoded_app_id = quote(app_id, safe="")
    
        logs = await get_client().get_application_logs(
            project_id, encoded_app_id, from_timestamp, to_timestamp, query, severity
        )
        return {
            "success": True,
            "logs": logs,
        }
  • CorootClient helper method that makes the HTTP request to the Coroot API endpoint for application logs.
    async def get_application_logs(
        self,
        project_id: str,
        app_id: str,
        from_timestamp: int | None = None,
        to_timestamp: int | None = None,
        query: str | None = None,
        severity: str | None = None,
    ) -> dict[str, Any]:
        """Get application logs.
    
        Args:
            project_id: Project ID.
            app_id: Application ID.
            from_timestamp: Start timestamp.
            to_timestamp: End timestamp.
            query: Log search query.
            severity: Filter by severity level.
    
        Returns:
            Application logs and patterns.
        """
        params = {}
        if from_timestamp:
            params["from"] = str(from_timestamp)
        if to_timestamp:
            params["to"] = str(to_timestamp)
        if query:
            params["query"] = query
        if severity:
            params["severity"] = severity
    
        response = await self._request(
            "GET",
            f"/api/project/{project_id}/app/{app_id}/logs",
            params=params,
        )
        data: dict[str, Any] = response.json()
        return data
  • Input schema and documentation for the get_application_logs tool, defining parameters and their descriptions.
    """Get application logs with pattern analysis.
    
    Retrieves application logs with automatic pattern detection
    and grouping. Supports filtering by time range, search query,
    and severity level.
    
    Args:
        project_id: Project ID
        app_id: Application ID (format: namespace/kind/name)
        from_timestamp: Start timestamp (optional)
        to_timestamp: End timestamp (optional)
        query: Log search query (optional)
        severity: Filter by severity level (optional)
    """
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It mentions 'automatic pattern detection and grouping' which adds useful behavioral context beyond basic retrieval. However, it doesn't disclose important details like rate limits, authentication requirements, pagination behavior, or what format the logs are returned in.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear purpose statement followed by parameter documentation. Every sentence earns its place, though the parameter documentation could be slightly more concise. The information is appropriately front-loaded with the core functionality stated first.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema (mentioned in context signals), the description doesn't need to explain return values. With 6 parameters and no annotations, the description provides good coverage of the tool's purpose and parameters. The main gap is lack of behavioral details like rate limits or authentication requirements.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates well by explaining all 6 parameters in the Args section, providing clear semantic meaning for each. It specifies which parameters are optional, describes the app_id format, and clarifies what each filter does. The only minor gap is not specifying severity level options.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves application logs with pattern analysis and grouping, which is a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'get_application_traces' or 'get_application_profiling', which appear to be related but distinct monitoring tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through the parameters (filtering by time range, search query, severity), suggesting when this tool would be appropriate. However, it doesn't provide explicit guidance on when to use this versus alternatives like 'get_application_traces' or mention any prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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