Skip to main content
Glama
akuity
by akuity

list_applications

Retrieve a list of applications managed by the ArgoCD MCP server, with optional filtering by name for partial matches.

Instructions

list_applications returns list of applications

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
searchNoSearch applications by name. This is a partial match on the application name and does not support glob patterns (e.g. "*"). Optional.

Implementation Reference

  • Registration of the 'list_applications' MCP tool using addJsonOutputTool, including tool name, description, input schema (search, limit, offset), and handler that delegates to ArgoCDClient.listApplications
    'list_applications', 'list_applications returns list of applications', { search: z .string() .optional() .describe( 'Search applications by name. This is a partial match on the application name and does not support glob patterns (e.g. "*"). Optional.' ), limit: z .number() .int() .positive() .optional() .describe( 'Maximum number of applications to return. Use this to reduce token usage when there are many applications. Optional.' ), offset: z .number() .int() .min(0) .optional() .describe( 'Number of applications to skip before returning results. Use with limit for pagination. Optional.' ) }, async ({ search, limit, offset }) => await this.argocdClient.listApplications({ search: search ?? undefined, limit, offset }) );
  • Zod input schema definition for the list_applications tool parameters: search (optional string), limit (optional positive integer), offset (optional non-negative integer)
    { search: z .string() .optional() .describe( 'Search applications by name. This is a partial match on the application name and does not support glob patterns (e.g. "*"). Optional.' ), limit: z .number() .int() .positive() .optional() .describe( 'Maximum number of applications to return. Use this to reduce token usage when there are many applications. Optional.' ), offset: z .number() .int() .min(0) .optional() .describe( 'Number of applications to skip before returning results. Use with limit for pagination. Optional.' ) },
  • Core implementation of listApplications in ArgoCDClient: calls ArgoCD API /api/v1/applications with search, strips heavy fields from applications to optimize MCP token usage, applies limit/offset pagination client-side, returns paginated items with metadata
    public async listApplications(params?: { search?: string; limit?: number; offset?: number }) { const { body } = await this.client.get<V1alpha1ApplicationList>( `/api/v1/applications`, params?.search ? { search: params.search } : undefined ); // Strip heavy fields to reduce token usage const strippedItems = body.items?.map((app) => ({ metadata: { name: app.metadata?.name, namespace: app.metadata?.namespace, labels: app.metadata?.labels, creationTimestamp: app.metadata?.creationTimestamp }, spec: { project: app.spec?.project, source: app.spec?.source, destination: app.spec?.destination }, status: { sync: app.status?.sync, health: app.status?.health, summary: app.status?.summary } })) ?? []; // Apply pagination const start = params?.offset ?? 0; const end = params?.limit ? start + params.limit : strippedItems.length; const items = strippedItems.slice(start, end); return { items, metadata: { resourceVersion: body.metadata?.resourceVersion, totalItems: strippedItems.length, returnedItems: items.length, hasMore: end < strippedItems.length } }; }

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