Skip to main content
Glama

delete_environment

Remove an Amazon MWAA environment by specifying its name to delete the managed Apache Airflow workflow environment and its associated resources.

Instructions

Delete an MWAA environment.

Args: name: The name of the environment to delete

Returns: Dictionary with deletion confirmation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core logic for the delete_environment tool, which invokes the MWAA client's delete_environment method and handles potential errors.
    async def delete_environment(self, name: str) -> Dict[str, Any]:
        """Delete an existing MWAA environment."""
        self._check_readonly("delete_environment")
    
        try:
            self.mwaa_client.delete_environment(Name=name)
            return {"message": f"Environment {name} deleted successfully"}
    
        except (ClientError, BotoCoreError) as e:
            logger.error("Error deleting environment %s: %s", name, e)
            return {"error": str(e)}
  • Tool registration for 'delete_environment' using the mcp.tool decorator, which delegates execution to the tools handler.
    @mcp.tool(name="delete_environment")
    async def delete_environment(
        name: str,
    ) -> Dict[str, Any]:
        """Delete an MWAA environment.
    
        Args:
            name: The name of the environment to delete
    
        Returns:
            Dictionary with deletion confirmation
        """
        return await tools.delete_environment(name)
Behavior2/5

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

No annotations provided, so description carries full burden. Mentions return type ('Dictionary with deletion confirmation') but fails to disclose critical behavioral traits: that deletion is permanent/irreversible, may take time, requires the environment to exist, or what happens to dependent resources. For an infrastructure destruction tool, this is a significant safety gap.

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

Conciseness3/5

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

Uses docstring-style Args/Returns formatting which is somewhat redundant with MCP's structured schema/output definitions. The content is concise but the structure splits information awkwardly between description text and schema fields.

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?

Tool has output schema (not shown but indicated in context), so minimal return value description is acceptable. However, for a destructive infrastructure operation, the description lacks critical contextual warnings about permanent data loss and should explicitly state confirmation is required or that the operation is final.

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 has 0% description coverage (name property has no description). The Args section compensates by documenting 'name: The name of the environment to delete', which adds necessary semantics. Could enhance by noting format constraints or that this refers to the EnvironmentName (not ARN).

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?

States specific verb (Delete) and resource (MWAA environment), distinguishing it from sibling tools like create_environment, update_environment, and get_environment. However, it could explicitly clarify that this permanently removes the resource versus updating it.

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?

No guidance provided on when to use this versus update_environment, or prerequisites like ensuring no active DAG runs exist. No warnings about irreversibility or sync vs async behavior.

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/paschmaria/mwaa-mcp-server'

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