Skip to main content
Glama
Rootly-AI-Labs

Rootly MCP server

Official

listEnvironments

Retrieve and filter environment data from the Rootly MCP server using specific query parameters such as name, slug, creation date, and sorting options.

Instructions

List environments

Query Parameters:

  • include: No description.

  • page_number: No description.

  • page_size: No description.

  • filter_search: No description.

  • filter_slug: No description.

  • filter_name: No description.

  • filter_color: No description.

  • filter_created_at_gt: No description.

  • filter_created_at_gte: No description.

  • filter_created_at_lt: No description.

  • filter_created_at_lte: No description.

  • sort: No description.

Responses:

  • 200 (Success): success

    • Content-Type: application/vnd.api+json

    • Example:

{
  "key": "value"
}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filter_colorNo
filter_created_at_gtNo
filter_created_at_gteNo
filter_created_at_ltNo
filter_created_at_lteNo
filter_nameNo
filter_searchNo
filter_slugNo
includeNo
page_numberNo
page_sizeNo
sortNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registers the listEnvironments tool (among others) by creating FastMCP server from filtered OpenAPI spec containing the /environments endpoint.
    # Create the MCP server using OpenAPI integration
    # By default, all routes become tools which is what we want
    mcp = FastMCP.from_openapi(
        openapi_spec=filtered_spec,
        client=http_client.client,
        name=name,
        timeout=30.0,
        tags={"rootly", "incident-management"},
    )
  • DEFAULT_ALLOWED_PATHS includes /environments endpoint, which generates the listEnvironments tool.
    # Environments
    "/environments",
    "/environments/{environment_id}",
    # Users
  • AuthenticatedHTTPXClient.request method executes the HTTP requests for generated OpenAPI tools, including GET /v1/environments for listEnvironments.
    async def request(self, method: str, url: str, **kwargs):
        """Override request to transform parameters."""
        # Transform query parameters
        if 'params' in kwargs:
            kwargs['params'] = self._transform_params(kwargs['params'])
    
        # Call the underlying client's request method and let it handle everything
        return await self.client.request(method, url, **kwargs)
  • Sanitizes parameter names in the OpenAPI spec used to generate input schema for listEnvironments tool.
    parameter_mapping = sanitize_parameters_in_spec(filtered_spec)
    logger.info(f"Sanitized parameter names for MCP compatibility (mapped {len(parameter_mapping)} parameters)")
  • Helper function that sanitizes parameter names in OpenAPI spec to MCP-compliant format, affecting input schema for listEnvironments.
    def sanitize_parameters_in_spec(spec: Dict[str, Any]) -> Dict[str, str]:
        """
        Sanitize all parameter names in an OpenAPI specification.
        
        This function modifies the spec in-place and builds a mapping 
        of sanitized names to original names.
        
        Args:
            spec: OpenAPI specification dictionary
            
        Returns:
            Dictionary mapping sanitized names to original names
        """
        parameter_mapping = {}
        
        # Sanitize parameters in paths
        if "paths" in spec:
            for path, path_item in spec["paths"].items():
                if not isinstance(path_item, dict):
                    continue
                    
                # Sanitize path-level parameters
                if "parameters" in path_item:
                    for param in path_item["parameters"]:
                        if "name" in param:
                            original_name = param["name"]
                            sanitized_name = sanitize_parameter_name(original_name)
                            if sanitized_name != original_name:
                                logger.debug(f"Sanitized path-level parameter: '{original_name}' -> '{sanitized_name}'")
                                param["name"] = sanitized_name
                                parameter_mapping[sanitized_name] = original_name
                
                # Sanitize operation-level parameters
                for method, operation in path_item.items():
                    if method.lower() not in ["get", "post", "put", "delete", "patch", "options", "head", "trace"]:
                        continue
                    if not isinstance(operation, dict):
                        continue
                        
                    if "parameters" in operation:
                        for param in operation["parameters"]:
                            if "name" in param:
                                original_name = param["name"]
                                sanitized_name = sanitize_parameter_name(original_name)
                                if sanitized_name != original_name:
                                    logger.debug(f"Sanitized operation parameter: '{original_name}' -> '{sanitized_name}'")
                                    param["name"] = sanitized_name
                                    parameter_mapping[sanitized_name] = original_name
        
        # Sanitize parameters in components (OpenAPI 3.0)
        if "components" in spec and "parameters" in spec["components"]:
            for param_name, param_def in spec["components"]["parameters"].items():
                if isinstance(param_def, dict) and "name" in param_def:
                    original_name = param_def["name"]
                    sanitized_name = sanitize_parameter_name(original_name)
                    if sanitized_name != original_name:
                        logger.debug(f"Sanitized component parameter: '{original_name}' -> '{sanitized_name}'")
                        param_def["name"] = sanitized_name
                        parameter_mapping[sanitized_name] = original_name
        
        return parameter_mapping
Behavior1/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. The description only states 'List environments' with no information about whether this is a read-only operation, what permissions are required, whether results are paginated (though parameters suggest they are), rate limits, or what the response contains. For a tool with 12 parameters and no annotation coverage, this is completely inadequate.

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

Conciseness2/5

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

While technically concise with 'List environments' as the main description, this is under-specification rather than effective conciseness. The inclusion of the parameter list with 'No description' for each parameter adds bulk without value. The structure is poor - the response example shows generic JSON without explaining what environment data looks like, making the overall description inefficient despite its brevity.

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

Completeness1/5

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

Given the complexity (12 parameters, no annotations, no schema descriptions) and the existence of an output schema, the description is completely inadequate. While the output schema might document return values, the description fails to explain what 'environments' are, how filtering works, when to use pagination parameters, or any behavioral aspects. For a listing tool with extensive filtering capabilities, this leaves the agent with insufficient context.

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

Parameters1/5

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

Schema description coverage is 0% (none of the 12 parameters have descriptions in the schema), and the description provides no meaningful parameter information beyond listing parameter names. The description includes a 'Query Parameters' section that merely repeats parameter names with 'No description' for each, adding zero semantic value. This fails to compensate for the complete lack of schema descriptions.

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

Purpose2/5

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

The description states 'List environments' which is a tautology that merely restates the tool name. It doesn't specify what an 'environment' is in this context (development, staging, production environments?) or what information is included in the listing. While the verb 'list' is clear, the resource 'environments' lacks context, making the purpose vague.

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

Usage Guidelines1/5

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

No guidance is provided about when to use this tool versus alternatives. There are multiple sibling tools with 'list' prefixes (listAlerts, listIncidents, listServices, etc.), but the description doesn't differentiate this tool from those or indicate when filtering environments is appropriate versus using other listing tools. The description provides zero usage context.

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

Related 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/Rootly-AI-Labs/Rootly-MCP-server'

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