get_resource_actions
Retrieve available actions for a specific resource managed by an ArgoCD application to manage Kubernetes deployments.
Instructions
get_resource_actions returns actions for a resource that is managed by an application
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| applicationName | Yes | ||
| applicationNamespace | Yes | 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. | |
| resourceRef | Yes |
Implementation Reference
- src/argocd/client.ts:280-297 (handler)The ArgoCDClient.getResourceActions method implements the core logic of fetching resource actions from the ArgoCD API.public async getResourceActions( applicationName: string, applicationNamespace: string, resourceRef: V1alpha1ResourceResult ) { const { body } = await this.client.get<{ actions: V1alpha1ResourceAction[] }>( `/api/v1/applications/${applicationName}/resource/actions`, { appNamespace: applicationNamespace, namespace: resourceRef.namespace, resourceName: resourceRef.name, group: resourceRef.group, kind: resourceRef.kind, version: resourceRef.version } ); return body; }
- src/server/server.ts:196-210 (registration)MCP tool registration for 'get_resource_actions', including description, input schema references, and delegation to ArgoCDClient.getResourceActions.this.addJsonOutputTool( 'get_resource_actions', 'get_resource_actions returns actions for a resource that is managed by an application', { applicationName: z.string(), applicationNamespace: ApplicationNamespaceSchema, resourceRef: ResourceRefSchema }, async ({ applicationName, applicationNamespace, resourceRef }) => await this.argocdClient.getResourceActions( applicationName, applicationNamespace, resourceRef as V1alpha1ResourceResult ) );
- src/shared/models/schema.ts:13-20 (schema)Zod schema definition for ResourceRef parameter used in the get_resource_actions tool.export const ResourceRefSchema = z.object({ uid: z.string(), kind: z.string(), namespace: z.string(), name: z.string(), version: z.string(), group: z.string() });
- src/shared/models/schema.ts:3-11 (schema)Zod schema definition for ApplicationNamespace parameter used in the get_resource_actions tool.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.` );