get_resource_actions
Retrieve actions for a resource managed by an application in ArgoCD. Specifies the application name, namespace, and resource details to list applicable actions.
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 of the application. Note that this may differ from the namespace of individual resources. Make sure to verify the application namespace in the Application resource — it is often argocd, but not always. | |
| resourceRef | Yes |
Implementation Reference
- src/argocd/client.ts:280-297 (handler)Core handler function that executes the tool logic by querying the ArgoCD REST API for available actions on the specified resource.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)Registers the MCP tool 'get_resource_actions' with its description, Zod input schema, and handler callback delegating to ArgoCD client.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/server/server.ts:199-203 (schema)Zod input schema specific to the get_resource_actions tool parameters.{ applicationName: z.string(), applicationNamespace: ApplicationNamespaceSchema, resourceRef: ResourceRefSchema },
- src/shared/models/schema.ts:13-20 (schema)Reusable Zod schema defining the ResourceRef type used in the tool's input schema.export const ResourceRefSchema = z.object({ uid: z.string(), kind: z.string(), namespace: z.string(), name: z.string(), version: z.string(), group: z.string() });