get_application
Retrieve ArgoCD application details by name and optional namespace to monitor deployment status and configurations.
Instructions
get_application returns application by application name. Optionally specify the application namespace to get applications from non-default namespaces.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| applicationName | Yes | ||
| applicationNamespace | No | 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. |
Implementation Reference
- src/server/server.ts:68-77 (registration)Registration of the 'get_application' tool, including input schema and thin handler that delegates to ArgoCD clientthis.addJsonOutputTool( 'get_application', 'get_application returns application by application name. Optionally specify the application namespace to get applications from non-default namespaces.', { applicationName: z.string(), applicationNamespace: ApplicationNamespaceSchema.optional() }, async ({ applicationName, applicationNamespace }) => await this.argocdClient.getApplication(applicationName, applicationNamespace) );
- src/argocd/client.ts:68-75 (handler)Core handler function in ArgoCD client that performs the HTTP GET request to retrieve the application details from the ArgoCD APIpublic async getApplication(applicationName: string, appNamespace?: string) { const queryParams = appNamespace ? { appNamespace } : undefined; const { body } = await this.client.get<V1alpha1Application>( `/api/v1/applications/${applicationName}`, queryParams ); return body; }