Skip to main content
Glama
jamesbrink

MCP Server for Coroot

configure_tracing

Configure distributed tracing settings for applications, including sampling rates and URL path exclusions, to control trace collection and optimize performance monitoring.

Instructions

Configure distributed tracing for an application.

Controls trace collection settings including sampling rate and paths to exclude from tracing.

Args: project_id: The project ID app_id: The application ID enabled: Whether to enable tracing sample_rate: Optional trace sampling rate (0.0-1.0) excluded_paths: Optional list of URL paths to exclude

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
app_idYes
enabledYes
sample_rateNo
excluded_pathsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler implementation for the configure_tracing tool. Handles FastMCP type conversion issues by parsing string sample_rate to float and JSON string excluded_paths to list. Builds the config dictionary and calls the Coroot client to update tracing configuration.
    async def configure_tracing_impl(
        project_id: str,
        app_id: str,
        enabled: bool,
        sample_rate: Any = None,
        excluded_paths: Any = None,
    ) -> dict[str, Any]:
        """Implementation for configure_tracing tool."""
        try:
            client = get_client()
            config = {"enabled": enabled}
    
            # Handle FastMCP type conversion issue for sample_rate
            if sample_rate is not None:
                if isinstance(sample_rate, str):
                    try:
                        sample_rate = float(sample_rate)
                    except ValueError:
                        return {
                            "success": False,
                            "error": f"Invalid sample_rate: {sample_rate}",
                        }
                config["sample_rate"] = sample_rate
    
            # Handle FastMCP type conversion issue for excluded_paths
            if excluded_paths:
                if isinstance(excluded_paths, str):
                    try:
                        excluded_paths = json.loads(excluded_paths)
                        if not isinstance(excluded_paths, list):
                            return {
                                "success": False,
                                "error": (
                                    f"excluded_paths must be a list, "
                                    f"got {type(excluded_paths).__name__}"
                                ),
                            }
                    except json.JSONDecodeError:
                        return {
                            "success": False,
                            "error": f"Invalid JSON for excluded_paths: {excluded_paths}",
                        }
                config["excluded_paths"] = excluded_paths
    
            result = await client.configure_tracing(project_id, app_id, config)
            return {
                "success": True,
                "message": "Tracing 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)}"}
  • Registers the 'configure_tracing' tool with the FastMCP server using the @mcp.tool() decorator. Defines the tool schema via function parameters and docstring. Acts as a thin wrapper delegating to the impl function.
    @mcp.tool()
    async def configure_tracing(
        project_id: str,
        app_id: str,
        enabled: bool,
        sample_rate: Any = None,
        excluded_paths: Any = None,
    ) -> dict[str, Any]:
        """
        Configure distributed tracing for an application.
    
        Controls trace collection settings including sampling rate and
        paths to exclude from tracing.
    
        Args:
            project_id: The project ID
            app_id: The application ID
            enabled: Whether to enable tracing
            sample_rate: Optional trace sampling rate (0.0-1.0)
            excluded_paths: Optional list of URL paths to exclude
        """
        return await configure_tracing_impl(
            project_id, app_id, enabled, sample_rate, excluded_paths
        )
  • CorootClient helper method that performs the HTTP POST request to the Coroot API endpoint for updating tracing configuration. Called by the tool handler.
    async def configure_tracing(
        self, project_id: str, app_id: str, config: dict[str, Any]
    ) -> dict[str, Any]:
        """Configure tracing for an application.
    
        Args:
            project_id: The project ID
            app_id: The application ID
            config: Tracing 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}/tracing",
            json=config,
        )
        data: dict[str, Any] = response.json()
        return data
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a configuration tool (implies mutation) but doesn't describe permissions needed, whether changes are reversible, rate limits, or what the output contains. The description mentions controlling settings but lacks critical behavioral context for a mutation tool.

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 a parameter breakdown. Every sentence adds value, though the parameter explanations could be slightly more concise. It's appropriately sized for a 5-parameter configuration tool.

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 this is a mutation tool with no annotations but with an output schema (which handles return values), the description is moderately complete. It explains what the tool does and documents parameters well, but lacks behavioral context about permissions, side effects, or error conditions that would be important for a configuration tool.

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 semantic explanations for all 5 parameters: identifies required vs optional parameters, explains what each represents (e.g., 'sample_rate: Optional trace sampling rate (0.0-1.0)'), and clarifies the purpose of each field. This adds substantial 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: 'Configure distributed tracing for an application' with specific controls over 'trace collection settings including sampling rate and paths to exclude from tracing.' This is a clear verb+resource statement, though it doesn't explicitly differentiate from sibling tools like 'configure_logs' or 'configure_profiling' which handle other monitoring aspects.

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 prerequisites, when tracing should be enabled/disabled, or how it relates to sibling tools like 'configure_logs' or 'get_application_traces.' Usage is implied 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