Skip to main content
Glama
akuity
by akuity

run_resource_action

Execute actions on ArgoCD application resources to manage deployments, sync operations, or perform maintenance tasks within Kubernetes namespaces.

Instructions

run_resource_action runs an action on a resource

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
applicationNameYes
applicationNamespaceYesThe namespace where the ArgoCD application resource will be created. This is the namespace of the Application resource itself, not the destination namespace for the application's resources. You can specify any valid Kubernetes namespace (e.g., 'argocd', 'argocd-apps', 'my-namespace', etc.). The default ArgoCD namespace is typically 'argocd', but you can use any namespace you prefer.
resourceRefYes
actionYes

Implementation Reference

  • Core handler function that executes the ArgoCD API call to run a resource action.
    public async runResourceAction( applicationName: string, applicationNamespace: string, resourceRef: V1alpha1ResourceResult, action: string ) { const { body } = await this.client.post<string, V1alpha1Application>( `/api/v1/applications/${applicationName}/resource/actions`, { appNamespace: applicationNamespace, namespace: resourceRef.namespace, resourceName: resourceRef.name, group: resourceRef.group, kind: resourceRef.kind, version: resourceRef.version }, action ); return body; }
  • Registers the MCP tool 'run_resource_action' with input schema and handler that delegates to ArgoCD client.
    this.addJsonOutputTool( 'run_resource_action', 'run_resource_action runs an action on a resource', { applicationName: z.string(), applicationNamespace: ApplicationNamespaceSchema, resourceRef: ResourceRefSchema, action: z.string() }, async ({ applicationName, applicationNamespace, resourceRef, action }) => await this.argocdClient.runResourceAction( applicationName, applicationNamespace, resourceRef as V1alpha1ResourceResult, action ) );
  • Zod schema for ResourceRef used in the tool's input validation.
    export const ResourceRefSchema = z.object({ uid: z.string(), kind: z.string(), namespace: z.string(), name: z.string(), version: z.string(), group: z.string() });
  • Zod schema for ApplicationNamespace used in the tool's input validation.
    export const ApplicationNamespaceSchema = z .string() .min(1) .describe( `The namespace where the ArgoCD application resource will be created. This is the namespace of the Application resource itself, not the destination namespace for the application's resources. You can specify any valid Kubernetes namespace (e.g., 'argocd', 'argocd-apps', 'my-namespace', etc.). The default ArgoCD namespace is typically 'argocd', but you can use any namespace you prefer.` );

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