Skip to main content
Glama
jamesbrink

MCP Server for Coroot

configure_logs

Configure log collection settings for applications by setting log level filters and pattern exclusions to control which logs are processed.

Instructions

Configure log collection settings for an application.

Controls which logs are collected and processed, including log level filtering and pattern exclusions.

Args: project_id: The project ID app_id: The application ID enabled: Whether to enable log collection level: Optional minimum log level (debug, info, warn, error) excluded_patterns: Optional regex patterns to exclude

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
app_idYes
enabledYes
levelNo
excluded_patternsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Primary MCP tool handler for 'configure_logs'. Decorated with @mcp.tool() which registers the tool. Calls configure_logs_impl to perform the action. Input schema defined by parameters and docstring.
    @mcp.tool()
    async def configure_logs(
        project_id: str,
        app_id: str,
        enabled: bool,
        level: str | None = None,
        excluded_patterns: list[str] | None = None,
    ) -> dict[str, Any]:
        """
        Configure log collection settings for an application.
    
        Controls which logs are collected and processed, including
        log level filtering and pattern exclusions.
    
        Args:
            project_id: The project ID
            app_id: The application ID
            enabled: Whether to enable log collection
            level: Optional minimum log level (debug, info, warn, error)
            excluded_patterns: Optional regex patterns to exclude
        """
        return await configure_logs_impl(
            project_id, app_id, enabled, level, excluded_patterns
        )
  • Helper implementation that builds the config dict from tool parameters and calls the CorootClient.configure_logs method, handling errors.
    async def configure_logs_impl(
        project_id: str,
        app_id: str,
        enabled: bool,
        level: str | None = None,
        excluded_patterns: list[str] | None = None,
    ) -> dict[str, Any]:
        """Implementation for configure_logs tool."""
        try:
            client = get_client()
            config: dict[str, Any] = {"enabled": enabled}
            if level:
                config["level"] = level
            if excluded_patterns:
                config["excluded_patterns"] = excluded_patterns
            result = await client.configure_logs(project_id, app_id, config)
            return {
                "success": True,
                "message": "Log collection configuration updated successfully",
                "config": result,
            }
        except ValueError as e:
            return {"success": False, "error": str(e)}
        except Exception as e:
            return {"success": False, "error": f"Unexpected error: {str(e)}"}
  • CorootClient method that performs the actual HTTP POST request to the Coroot API to configure logs for the application.
    async def configure_logs(
        self, project_id: str, app_id: str, config: dict[str, Any]
    ) -> dict[str, Any]:
        """Configure log collection for an application.
    
        Args:
            project_id: The project ID
            app_id: The application ID
            config: Log collection configuration
    
        Returns:
            Dict containing updated configuration
        """
        # URL encode the app_id in case it contains slashes
        encoded_app_id = quote(app_id, safe="")
        response = await self._request(
            "POST", f"/api/project/{project_id}/app/{encoded_app_id}/logs", json=config
        )
        return self._parse_json_response(response)
  • The @mcp.tool() decorator registers the configure_logs function as an MCP tool with the name 'configure_logs'.
    @mcp.tool()
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'configures' settings, implying a mutation operation, but doesn't describe permissions required, whether changes are reversible, side effects, or response format. The description adds minimal behavioral context beyond the basic action.

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 appropriately sized and well-structured. It starts with a clear purpose statement, adds context about what's controlled, and then lists parameters with explanations. Each sentence earns its place, though the parameter section could be slightly more integrated into the flow.

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

Completeness3/5

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

Given 5 parameters with 0% schema coverage and no annotations, the description does a good job explaining parameters but lacks behavioral details for a mutation tool. The presence of an output schema reduces the need to describe return values, but more context on permissions or side effects would improve completeness.

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?

Schema description coverage is 0%, so the description must compensate. It provides clear semantics for all 5 parameters in the 'Args' section, explaining what each parameter controls (e.g., 'project_id: The project ID', 'level: Optional minimum log level (debug, info, warn, error)'). This adds significant value beyond the bare schema.

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's purpose as 'Configure log collection settings for an application' and specifies what it controls ('which logs are collected and processed, including log level filtering and pattern exclusions'). This is specific about the verb ('configure') and resource ('log collection settings'), though it doesn't explicitly differentiate from sibling tools like 'configure_integration' or 'configure_tracing'.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'configure_integration' or 'configure_tracing', nor does it specify prerequisites, dependencies, or scenarios where this tool is appropriate. Usage is implied by the purpose but not explicitly stated.

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