Skip to main content
Glama
argoproj-labs

argocd-mcp

Official

get_resource_actions

Retrieve available actions for a specific resource managed by an ArgoCD application to manage Kubernetes deployments.

Instructions

get_resource_actions returns actions for a resource that is managed by an application

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

Implementation Reference

  • The ArgoCDClient.getResourceActions method implements the core logic of fetching resource actions from the ArgoCD API.
    public async getResourceActions(
      applicationName: string,
      applicationNamespace: string,
      resourceRef: V1alpha1ResourceResult
    ) {
      const { body } = await this.client.get<{ actions: V1alpha1ResourceAction[] }>(
        `/api/v1/applications/${applicationName}/resource/actions`,
        {
          appNamespace: applicationNamespace,
          namespace: resourceRef.namespace,
          resourceName: resourceRef.name,
          group: resourceRef.group,
          kind: resourceRef.kind,
          version: resourceRef.version
        }
      );
      return body;
    }
  • MCP tool registration for 'get_resource_actions', including description, input schema references, and delegation to ArgoCDClient.getResourceActions.
    this.addJsonOutputTool(
      'get_resource_actions',
      'get_resource_actions returns actions for a resource that is managed by an application',
      {
        applicationName: z.string(),
        applicationNamespace: ApplicationNamespaceSchema,
        resourceRef: ResourceRefSchema
      },
      async ({ applicationName, applicationNamespace, resourceRef }) =>
        await this.argocdClient.getResourceActions(
          applicationName,
          applicationNamespace,
          resourceRef as V1alpha1ResourceResult
        )
    );
  • Zod schema definition for ResourceRef parameter used in the get_resource_actions tool.
    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 definition for ApplicationNamespace parameter used in the get_resource_actions tool.
    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.`
      );
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It only states what the tool returns without detailing traits like read-only vs. mutative nature, permission requirements, rate limits, or error conditions. For a tool interacting with application-managed resources, this omission is critical—it doesn't clarify if this is a safe query or has side effects, leaving the agent with insufficient behavioral understanding.

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

Conciseness4/5

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

The description is a single, efficient sentence that directly states the tool's function without unnecessary words. It's front-loaded with the core purpose. However, it could be more structured by including key details like parameter context or usage, but as-is, it avoids redundancy and is appropriately concise for its limited content.

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

Completeness2/5

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

Given the complexity (3 parameters with nested objects, no output schema, no annotations), the description is incomplete. It doesn't cover behavioral aspects, parameter meanings, or output expectations (e.g., what 'actions' look like). For a tool in a server with many siblings and potential mutative operations, this leaves the agent under-informed about how to correctly invoke it or interpret results, failing to provide adequate context.

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

Parameters3/5

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

Schema description coverage is 33% (only 'applicationNamespace' has a description), and the description adds no parameter semantics beyond the schema. It doesn't explain 'applicationName', 'resourceRef', or their components (e.g., uid, kind), nor does it provide context on how these parameters relate to returning actions. With low schema coverage, the description fails to compensate, offering minimal value over the structured data. Baseline 3 is appropriate as the schema does some work, but gaps remain.

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

Purpose3/5

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

The description states the tool 'returns actions for a resource that is managed by an application', which provides a basic purpose but is vague. It specifies the verb ('returns actions') and resource scope ('resource managed by an application'), but doesn't clarify what 'actions' are (e.g., operations like restart, scale, sync) or how this differs from siblings like 'run_resource_action' or 'get_resource_events'. The purpose is understandable but lacks specificity for clear differentiation.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, context (e.g., after getting resources), or exclusions. With siblings like 'get_resources', 'run_resource_action', and 'get_resource_events', the agent lacks direction on selecting this tool for listing available actions versus executing them or viewing related events. This absence of usage context leaves significant ambiguity.

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