Skip to main content
Glama
argoproj-labs

argocd-mcp

Official

run_resource_action

Execute actions on ArgoCD application resources to manage deployments, sync operations, or perform maintenance tasks within Kubernetes namespaces.

Instructions

run_resource_action runs an action on a resource

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
applicationNameYes
applicationNamespaceYesThe 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.
resourceRefYes
actionYes

Implementation Reference

  • Core handler function that executes the ArgoCD API call to run a resource action.
    public async runResourceAction(
      applicationName: string,
      applicationNamespace: string,
      resourceRef: V1alpha1ResourceResult,
      action: string
    ) {
      const { body } = await this.client.post<string, V1alpha1Application>(
        `/api/v1/applications/${applicationName}/resource/actions`,
        {
          appNamespace: applicationNamespace,
          namespace: resourceRef.namespace,
          resourceName: resourceRef.name,
          group: resourceRef.group,
          kind: resourceRef.kind,
          version: resourceRef.version
        },
        action
      );
      return body;
    }
  • Registers the MCP tool 'run_resource_action' with input schema and handler that delegates to ArgoCD client.
    this.addJsonOutputTool(
      'run_resource_action',
      'run_resource_action runs an action on a resource',
      {
        applicationName: z.string(),
        applicationNamespace: ApplicationNamespaceSchema,
        resourceRef: ResourceRefSchema,
        action: z.string()
      },
      async ({ applicationName, applicationNamespace, resourceRef, action }) =>
        await this.argocdClient.runResourceAction(
          applicationName,
          applicationNamespace,
          resourceRef as V1alpha1ResourceResult,
          action
        )
    );
  • Zod schema for ResourceRef used in the tool's input validation.
    export const ResourceRefSchema = z.object({
      uid: z.string(),
      kind: z.string(),
      namespace: z.string(),
      name: z.string(),
      version: z.string(),
      group: z.string()
    });
  • Zod schema for ApplicationNamespace used in the tool's input validation.
    export const ApplicationNamespaceSchema = z
      .string()
      .min(1)
      .describe(
        `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.`
      );
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 provides none. It doesn't indicate whether this is a read or write operation, what permissions might be required, whether actions are reversible, what side effects might occur, or how the tool behaves in terms of rate limits or error conditions. For a tool that appears to execute actions on resources (potentially destructive), this lack of transparency is critical.

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

Conciseness3/5

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

The description is extremely concise - just one sentence. While this avoids unnecessary verbosity, it's so brief that it fails to provide meaningful information. The structure is simple but under-specified rather than efficiently informative. It's technically concise but at the expense of being useful.

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?

Given the complexity (4 parameters including nested objects, no annotations, no output schema, and low schema coverage), the description is completely inadequate. It doesn't explain what this tool actually does in practice, what kinds of actions can be run, what resources are involved, or what the expected outcomes are. For a tool that appears to execute potentially significant operations in an ArgoCD context, this level of incompleteness is problematic.

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

Parameters2/5

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

With only 25% schema description coverage (only 'applicationNamespace' has a description), the description provides no additional parameter information beyond what's in the schema. It doesn't explain what 'action' means, what valid actions are, what 'resourceRef' refers to, or how 'applicationName' relates to the resource. The description fails to compensate for the low schema coverage, leaving most parameters semantically unclear.

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 'run_resource_action runs an action on a resource' is a tautology that essentially restates the tool name. It doesn't specify what kind of actions can be run, what resources are involved, or what the actual purpose is beyond the literal interpretation of the name. The description fails to distinguish this tool from sibling tools like 'sync_application' or 'get_resource_actions' which also involve resource operations.

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. There's no mention of prerequisites, appropriate contexts, or relationships to sibling tools like 'get_resource_actions' (which might list available actions) or 'sync_application' (which might be an alternative way to affect resources). The agent receives no help in determining when this tool is the right choice.

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