get_application
Retrieve application details by providing the application name using the tool on the argocd-mcp server for streamlined management.
Instructions
get_application returns application by application name
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| applicationName | Yes |
Implementation Reference
- src/server/server.ts:68-77 (registration)Registers the MCP tool 'get_application' with Zod input schema (applicationName required, applicationNamespace optional) and async handler that calls ArgoCDClient.getApplicationthis.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 logic for fetching a specific ArgoCD application via HTTP GET to the ArgoCD API endpoint, including optional namespace query parameterpublic 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; }
- src/shared/models/schema.ts:3-3 (schema)Zod schema definition for applicationNamespace used in the tool's input validationexport const ApplicationNamespaceSchema = z