Skip to main content
Glama
akuity
by akuity

update_application

Modify application configurations in ArgoCD, including metadata, source details, sync policies, and destination settings, to ensure proper deployment and synchronization.

Instructions

update_application updates application

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
applicationYes
applicationNameYes

Implementation Reference

  • Registers the MCP tool 'update_application' with input schema and inline handler that calls ArgoCDClient.updateApplication
    'update_application', 'update_application updates application', { applicationName: z.string(), application: ApplicationSchema }, async ({ applicationName, application }) => await this.argocdClient.updateApplication( applicationName, application as V1alpha1Application ) ); this.addJsonOutputTool(
  • Core handler function that executes the HTTP PUT request to the ArgoCD API to update the specified application
    public async updateApplication(applicationName: string, application: V1alpha1Application) { const { body } = await this.client.put<V1alpha1Application, V1alpha1Application>( `/api/v1/applications/${applicationName}`, null, application ); return body;
  • Zod schema defining the structure of the application object passed to the tool, used for input validation
    export const ApplicationSchema = z.object({ metadata: z.object({ name: z.string(), namespace: ApplicationNamespaceSchema }), spec: z.object({ project: z.string(), source: z.object({ repoURL: z.string(), path: z.string(), targetRevision: z.string() }), syncPolicy: z.object({ syncOptions: z.array(z.string()), automated: z.object({ prune: z.boolean(), selfHeal: z.boolean() }).optional(), retry: z .object({ limit: z.number(), backoff: z.object({ duration: z.string(), maxDuration: z.string(), factor: z.number() }) }) }), destination: z.object({ server: z.string().optional(), namespace: z.string().optional(), name: z.string().optional() }) .refine( (data: { server?: string; name?: string }) => (!data.server && !!data.name) || (!!data.server && !data.name), { message: "Only one of server or name must be specified in destination" } ) .describe( `The destination of the application. Only one of server or name must be specified.` ) }) });

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