Skip to main content
Glama
argoproj-labs

argocd-mcp

Official

get_application_managed_resources

Retrieve Kubernetes resources managed by an Argo CD application, with optional filters for kind, namespace, name, and other attributes to handle large applications efficiently.

Instructions

get_application_managed_resources returns managed resources for application by application name with optional filtering. Use filters to avoid token limits with large applications. Examples: kind="ConfigMap" for config maps only, namespace="production" for specific namespace, or combine multiple filters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
applicationNameYes
kindNoFilter by Kubernetes resource kind (e.g., "ConfigMap", "Secret", "Deployment")
namespaceNoFilter by Kubernetes namespace
nameNoFilter by resource name
versionNoFilter by resource API version
groupNoFilter by API group
appNamespaceNoFilter by Argo CD application namespace
projectNoFilter by Argo CD project

Implementation Reference

  • Core handler function in ArgoCDClient that executes the HTTP GET request to the ArgoCD API endpoint for retrieving managed resources, applying optional filters.
    public async getApplicationManagedResources(
      applicationName: string,
      filters?: {
        namespace?: string;
        name?: string;
        version?: string;
        group?: string;
        kind?: string;
        appNamespace?: string;
        project?: string;
      }
    ) {
      const { body } = await this.client.get<{ items: V1alpha1ResourceDiff[] }>(
        `/api/v1/applications/${applicationName}/managed-resources`,
        filters
      );
      return body;
    }
  • MCP tool registration using addJsonOutputTool, including input schema (Zod), description, and thin wrapper handler that constructs filters and delegates to ArgoCDClient.getApplicationManagedResources.
    this.addJsonOutputTool(
      'get_application_managed_resources',
      'get_application_managed_resources returns managed resources for application by application name with optional filtering. Use filters to avoid token limits with large applications. Examples: kind="ConfigMap" for config maps only, namespace="production" for specific namespace, or combine multiple filters.',
      {
        applicationName: z.string(),
        kind: z
          .string()
          .optional()
          .describe(
            'Filter by Kubernetes resource kind (e.g., "ConfigMap", "Secret", "Deployment")'
          ),
        namespace: z.string().optional().describe('Filter by Kubernetes namespace'),
        name: z.string().optional().describe('Filter by resource name'),
        version: z.string().optional().describe('Filter by resource API version'),
        group: z.string().optional().describe('Filter by API group'),
        appNamespace: z.string().optional().describe('Filter by Argo CD application namespace'),
        project: z.string().optional().describe('Filter by Argo CD project')
      },
      async ({ applicationName, kind, namespace, name, version, group, appNamespace, project }) => {
        const filters = {
          ...(kind && { kind }),
          ...(namespace && { namespace }),
          ...(name && { name }),
          ...(version && { version }),
          ...(group && { group }),
          ...(appNamespace && { appNamespace }),
          ...(project && { project })
        };
        return await this.argocdClient.getApplicationManagedResources(
          applicationName,
          Object.keys(filters).length > 0 ? filters : undefined
        );
      }
    );
  • Input schema definition using Zod for validating tool parameters: applicationName (required), and optional filters for kind, namespace, name, version, group, appNamespace, project.
    {
      applicationName: z.string(),
      kind: z
        .string()
        .optional()
        .describe(
          'Filter by Kubernetes resource kind (e.g., "ConfigMap", "Secret", "Deployment")'
        ),
      namespace: z.string().optional().describe('Filter by Kubernetes namespace'),
      name: z.string().optional().describe('Filter by resource name'),
      version: z.string().optional().describe('Filter by resource API version'),
      group: z.string().optional().describe('Filter by API group'),
      appNamespace: z.string().optional().describe('Filter by Argo CD application namespace'),
      project: z.string().optional().describe('Filter by Argo CD project')
    },
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. It mentions 'token limits with large applications', which hints at performance constraints, but doesn't disclose other behavioral traits like whether this is a read-only operation, potential rate limits, authentication needs, error handling, or pagination behavior. For a tool with 8 parameters and no annotations, this is a significant gap in transparency.

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 appropriately sized with two sentences: the first states the purpose, the second provides usage guidance with examples. It's front-loaded with the core functionality and avoids unnecessary details. Every sentence earns its place, though it could be slightly more structured for clarity.

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

Completeness3/5

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

Given the complexity (8 parameters, no output schema, no annotations), the description is moderately complete. It covers the basic purpose and filter usage but lacks details on return values, error conditions, or behavioral constraints. Without annotations or output schema, more context on what 'managed resources' entails would improve completeness for this tool.

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 high at 88%, providing good documentation for most parameters. The description adds value by explaining the purpose of filters ('to avoid token limits') and giving examples (kind='ConfigMap', namespace='production'), which clarifies usage beyond the schema. However, it doesn't fully compensate for the 12% coverage gap or detail parameter interactions, so baseline 3 is appropriate.

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

Purpose4/5

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

The description clearly states the tool 'returns managed resources for application by application name with optional filtering', specifying both the action (returns) and resource (managed resources for application). It distinguishes from some siblings like get_application (which likely returns application metadata) or get_application_resource_tree (which suggests hierarchical structure), though not explicitly. However, it doesn't fully differentiate from get_resources which might overlap in scope.

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

Usage Guidelines3/5

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

The description provides some usage context: 'Use filters to avoid token limits with large applications' and gives examples of filters. This implies when to use filters but doesn't explicitly state when to use this tool versus alternatives like get_resources or get_application_resource_tree. No clear exclusions or prerequisites are mentioned, leaving usage somewhat implied rather than explicit.

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