Skip to main content
Glama
argoproj-labs

argocd-mcp

Official

update_application

Modify ArgoCD application configurations to change deployment source, destination, or sync policies for continuous delivery updates.

Instructions

update_application updates application

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
applicationNameYes
applicationYes

Implementation Reference

  • Registers the MCP 'update_application' tool with input schema and inline handler that delegates to ArgoCDClient
    this.addJsonOutputTool(
      'update_application',
      'update_application updates application',
      { applicationName: z.string(), application: ApplicationSchema },
      async ({ applicationName, application }) =>
        await this.argocdClient.updateApplication(
          applicationName,
          application as V1alpha1Application
        )
    );
  • Core handler logic: performs HTTP PUT to ArgoCD API endpoint /api/v1/applications/{applicationName} with the application manifest
    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 for validating the input 'application' object (V1alpha1Application) used by the tool
    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.`
          )
      })
    });
  • Helper method that wraps tool callbacks to provide JSON output formatting and error handling for all tools including update_application.
    private addJsonOutputTool<Args extends ZodRawShape, T>(
      name: string,
      description: string,
      paramsSchema: Args,
      cb: (...cbArgs: Parameters<ToolCallback<Args>>) => T
    ) {
      this.tool(name, description, paramsSchema as ZodRawShape, async (...args) => {
        try {
          const result = await cb.apply(this, args as Parameters<ToolCallback<Args>>);
          return {
            isError: false,
            content: [{ type: 'text', text: JSON.stringify(result) }]
          };
        } catch (error) {
          return {
            isError: true,
            content: [{ type: 'text', text: error instanceof Error ? error.message : String(error) }]
          };
        }
      });
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure but fails completely. It doesn't indicate whether this is a read-only or destructive operation, what permissions are required, whether changes are reversible, what happens on success/failure, or any rate limits or side effects. For a complex update operation with nested objects, this is critically insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

While technically concise with just three words, this represents under-specification rather than effective conciseness. The description fails to convey necessary information about a complex tool, making it inefficient for the agent to understand and use the tool correctly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex update tool with 2 parameters (one deeply nested), no annotations, no output schema, and 0% schema description coverage, the description is completely inadequate. It doesn't explain what an 'application' is in this context (ArgoCD), what fields can be updated, what the tool returns, or how it differs from related operations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage and 2 complex parameters (applicationName and a deeply nested application object), the description provides zero information about parameter meaning, required fields, or usage. The schema shows complex nested structures for metadata, spec, source, syncPolicy, and destination, but the description offers no guidance on what these represent or how to use them.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'update_application updates application' is a tautology that merely restates the tool name without adding meaningful information. It doesn't specify what type of application is being updated (ArgoCD application), what fields can be updated, or how this differs from sibling tools like create_application or sync_application.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides absolutely no guidance on when to use this tool versus alternatives. With multiple sibling tools like create_application, delete_application, get_application, and sync_application, the agent receives no information about appropriate use cases, prerequisites, or when to choose this tool over others.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/argoproj-labs/argocd-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server