Skip to main content
Glama
akuity
by akuity

get_resource_events

Retrieve events for a specific resource managed by an application, using application and resource details to ensure accurate tracking and monitoring.

Instructions

get_resource_events returns events for a resource that is managed by an application

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
applicationNameYes
applicationNamespaceYesThe namespace of the application. Note that this may differ from the namespace of individual resources. Make sure to verify the application namespace in the Application resource — it is often argocd, but not always.
resourceNameYes
resourceNamespaceYes
resourceUIDYes

Implementation Reference

  • Registration of the MCP 'get_resource_events' tool, including description, Zod input schema, and anonymous handler function that delegates to the ArgoCD client's getResourceEvents method.
    this.addJsonOutputTool( 'get_resource_events', 'get_resource_events returns events for a resource that is managed by an application', { applicationName: z.string(), applicationNamespace: ApplicationNamespaceSchema, resourceUID: z.string(), resourceNamespace: z.string(), resourceName: z.string() }, async ({ applicationName, applicationNamespace, resourceUID, resourceNamespace, resourceName }) => await this.argocdClient.getResourceEvents( applicationName, applicationNamespace, resourceUID, resourceNamespace, resourceName ) );
  • Zod schema defining the input parameters for the 'get_resource_events' tool.
    { applicationName: z.string(), applicationNamespace: ApplicationNamespaceSchema, resourceUID: z.string(), resourceNamespace: z.string(), resourceName: z.string()
  • Anonymous async handler function for the 'get_resource_events' tool, which invokes the ArgoCD client method with the parsed parameters.
    async ({ applicationName, applicationNamespace, resourceUID, resourceNamespace, resourceName }) => await this.argocdClient.getResourceEvents( applicationName, applicationNamespace, resourceUID, resourceNamespace, resourceName )
  • Implementation of getResourceEvents in ArgoCDClient class, performing a GET request to the ArgoCD API endpoint for resource events with the specified filters.
    public async getResourceEvents( applicationName: string, applicationNamespace: string, resourceUID: string, resourceNamespace: string, resourceName: string ) { const { body } = await this.client.get<V1EventList>( `/api/v1/applications/${applicationName}/events`, { appNamespace: applicationNamespace, resourceNamespace, resourceUID, resourceName } ); return body; }

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