Skip to main content
Glama
akuity
by akuity

delete_application

Remove an ArgoCD application from your Kubernetes cluster, optionally specifying namespace, cascade deletion, and propagation policy for proper cleanup.

Instructions

delete_application deletes application. Specify applicationNamespace if the application is in a non-default namespace to avoid permission errors.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
applicationNameYes
applicationNamespaceNoThe namespace where the application is located. Required if application is not in the default namespace.
cascadeNoWhether to cascade the deletion to child resources
propagationPolicyNoDeletion propagation policy (e.g., "Foreground", "Background", "Orphan")

Implementation Reference

  • The ArgoCDClient.deleteApplication method implements the core logic for deleting an ArgoCD application via HTTP DELETE request to the ArgoCD API, handling optional parameters like namespace, cascade, and propagation policy.
    public async deleteApplication( applicationName: string, options?: { appNamespace?: string; cascade?: boolean; propagationPolicy?: string; } ) { const queryParams: Record<string, string | boolean> = {}; if (options?.appNamespace) { queryParams.appNamespace = options.appNamespace; } if (options?.cascade !== undefined) { queryParams.cascade = options.cascade; } if (options?.propagationPolicy) { queryParams.propagationPolicy = options.propagationPolicy; } const { body } = await this.client.delete<V1alpha1Application>( `/api/v1/applications/${applicationName}`, Object.keys(queryParams).length > 0 ? queryParams : undefined ); return body; }
  • MCP tool registration for 'delete_application', including input schema validation with Zod and the thin wrapper handler that delegates to ArgoCDClient.deleteApplication.
    this.addJsonOutputTool( 'delete_application', 'delete_application deletes application. Specify applicationNamespace if the application is in a non-default namespace to avoid permission errors.', { applicationName: z.string(), applicationNamespace: ApplicationNamespaceSchema.optional().describe( 'The namespace where the application is located. Required if application is not in the default namespace.' ), cascade: z .boolean() .optional() .describe('Whether to cascade the deletion to child resources'), propagationPolicy: z .string() .optional() .describe('Deletion propagation policy (e.g., "Foreground", "Background", "Orphan")') }, async ({ applicationName, applicationNamespace, cascade, propagationPolicy }) => { const options: Record<string, string | boolean> = {}; if (applicationNamespace) options.appNamespace = applicationNamespace; if (cascade !== undefined) options.cascade = cascade; if (propagationPolicy) options.propagationPolicy = propagationPolicy; return await this.argocdClient.deleteApplication( applicationName, Object.keys(options).length > 0 ? options : undefined ); } );
  • Input schema for the 'delete_application' tool using Zod for validation of parameters: applicationName (required string), applicationNamespace (optional), cascade (optional boolean), propagationPolicy (optional string).
    { applicationName: z.string(), applicationNamespace: ApplicationNamespaceSchema.optional().describe( 'The namespace where the application is located. Required if application is not in the default namespace.' ), cascade: z .boolean() .optional() .describe('Whether to cascade the deletion to child resources'), propagationPolicy: z .string() .optional() .describe('Deletion propagation policy (e.g., "Foreground", "Background", "Orphan")') },

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

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