Skip to main content
Glama
akuity
by akuity

get_application_workload_logs

Retrieve logs for ArgoCD application workloads like Deployments, StatefulSets, and Pods to monitor and troubleshoot Kubernetes resources by specifying application name, namespace, and resource reference.

Instructions

get_application_workload_logs returns logs for application workload (Deployment, StatefulSet, Pod, etc.) by application name and resource ref and optionally container name

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
containerYes

Implementation Reference

  • Implements the core logic for fetching workload logs from the ArgoCD API using a streaming GET request with parameters specific to the workload resource and container.
    public async getWorkloadLogs( applicationName: string, applicationNamespace: string, resourceRef: V1alpha1ResourceResult, container: string ) { const logs: ApplicationLogEntry[] = []; await this.client.getStream<ApplicationLogEntry>( `/api/v1/applications/${applicationName}/logs`, { appNamespace: applicationNamespace, namespace: resourceRef.namespace, resourceName: resourceRef.name, group: resourceRef.group, kind: resourceRef.kind, version: resourceRef.version, follow: false, tailLines: 100, container: container }, (chunk) => logs.push(chunk) ); return logs; }
  • Registers the MCP tool 'get_application_workload_logs' with its description, Zod input schema, and thin handler that delegates to ArgoCDClient.getWorkloadLogs.
    this.addJsonOutputTool( 'get_application_workload_logs', 'get_application_workload_logs returns logs for application workload (Deployment, StatefulSet, Pod, etc.) by application name and resource ref and optionally container name', { applicationName: z.string(), applicationNamespace: ApplicationNamespaceSchema, resourceRef: ResourceRefSchema, container: z.string() }, async ({ applicationName, applicationNamespace, resourceRef, container }) => await this.argocdClient.getWorkloadLogs( applicationName, applicationNamespace, resourceRef as V1alpha1ResourceResult, container ) );
  • Zod schema for ResourceRef type 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.` );

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