Skip to main content
Glama

delete_application

Remove ArgoCD applications and associated resources using the 'delete_application' tool. Specify the application name, cascade deletion, propagation policy, and namespace to manage deletions efficiently.

Instructions

Delete an application from ArgoCD

Args:
    name: The name of the application to delete (required)
    cascade: Whether to delete application resources as well (default: True)
    propagation_policy: The propagation policy ("foreground", "background", or "orphan")
    namespace: The application namespace (optional)

Returns:
    Success message or error details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cascadeNo
nameYes
namespaceNo
propagation_policyNo

Implementation Reference

  • The handler function that executes the delete_application tool by sending a DELETE request to the ArgoCD applications/{name} endpoint with parameters for cascade deletion, propagation policy, and namespace.
    async def delete_application(
        name: str, cascade: bool = True, propagation_policy: str = "", namespace: str = ""
    ) -> Dict[str, Any]:
        """
        Delete an application from ArgoCD
    
        Args:
            name: The name of the application to delete (required)
            cascade: Whether to delete application resources as well (default: True)
            propagation_policy: The propagation policy ("foreground", "background", or "orphan")
            namespace: The application namespace (optional)
    
        Returns:
            Success message or error details
        """
        params = {"cascade": str(cascade).lower()}
    
        if propagation_policy and propagation_policy in [
            "foreground",
            "background",
            "orphan",
        ]:
            params["propagationPolicy"] = propagation_policy
    
        if namespace:
            params["appNamespace"] = namespace
    
        success, data = await make_api_request(
            f"applications/{name}", method="DELETE", params=params
        )
    
        if success:
            logger.info(f"Application '{name}' deleted successfully (cascade: {cascade})")
            return {
                "status": "success",
                "message": f"Application '{name}' deleted successfully",
                "details": data,
            }
        else:
            logger.error(f"Failed to delete application '{name}': {data.get('error')}")
            return {
                "error": data.get("error", f"Failed to delete application '{name}'"),
                "details": data,
            }
  • server.py:45-45 (registration)
    Registers the delete_application function as an MCP tool using the FastMCP tool decorator.
    mcp.tool()(applications.delete_application)
Behavior2/5

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

With no annotations provided, the description carries full burden but only minimally discloses behavior. It mentions 'cascade' and 'propagation_policy' parameters which hint at deletion behavior, but doesn't explain what 'delete application resources' entails, potential side effects, permissions needed, or error handling. For a destructive tool, this is inadequate.

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 front-loaded with the core purpose. The Args/Returns structure is clear, though the 'Returns' section is vague ('Success message or error details'). No redundant sentences, but could be slightly more concise.

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

Completeness2/5

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

For a destructive tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It lacks critical context: no warnings about irreversible deletion, no explanation of what 'application resources' are, no error scenarios, and the return value description is too vague. Should provide more behavioral detail.

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?

The description adds significant value beyond the schema, which has 0% coverage. It explains each parameter's purpose: 'name' as required application identifier, 'cascade' as controlling resource deletion with default, 'propagation_policy' with enum values, and 'namespace' as optional. This compensates well for the schema's lack of descriptions.

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 verb 'Delete' and resource 'application from ArgoCD', making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'create_application' or 'update_application' beyond the obvious difference in action verbs, missing explicit sibling distinction.

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 is provided on when to use this tool versus alternatives like 'sync_application' or 'update_application', nor any prerequisites or warnings about destructive effects. The description merely lists parameters without contextual usage advice.

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/severity1/argocd-mcp'

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