list_applications
Filter and list ArgoCD applications by project, name, repository, or namespace, with optional application reconciliation using the refresh parameter.
Instructions
List applications in ArgoCD with filtering options
Args:
project: Filter applications by project name
name: Filter applications by name
repo: Filter applications by repository URL
namespace: Filter applications by namespace
refresh: Forces application reconciliation if set to 'hard' or 'normal'
Returns:
List of applications with pagination information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| namespace | No | ||
| project | No | ||
| refresh | No | ||
| repo | No |
Implementation Reference
- tools/applications.py:18-60 (handler)The main asynchronous handler function for the 'list_applications' tool. It constructs query parameters from input filters (project, name, repo, namespace, refresh) and calls the ArgoCD API via make_api_request to list matching applications, returning the data or an error.async def list_applications( project: str = "", name: str = "", repo: str = "", namespace: str = "", refresh: str = "", ) -> Dict[str, Any]: """ List applications in ArgoCD with filtering options Args: project: Filter applications by project name name: Filter applications by name repo: Filter applications by repository URL namespace: Filter applications by namespace refresh: Forces application reconciliation if set to 'hard' or 'normal' Returns: List of applications with pagination information """ params = {} if project: params["project"] = project if name: params["name"] = name if repo: params["repo"] = repo if namespace: params["appNamespace"] = namespace if refresh in ["hard", "normal"]: params["refresh"] = refresh success, data = await make_api_request("applications", params=params) if not success: return {"error": data.get("error", "Failed to retrieve applications")} return data
- server.py:41-41 (registration)The registration of the 'list_applications' tool in the FastMCP server instance using the @mcp.tool() decorator, making it available via the MCP protocol.mcp.tool()(applications.list_applications)