get_apps
Retrieve and filter Qlik Sense applications by name, stream, or published status with pagination support for efficient management.
Instructions
Get list of Qlik Sense applications with essential fields and filters (name, stream, published) and pagination.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of apps to return (default: 25, max: 50) | |
| offset | No | Number of apps to skip for pagination (default: 0) | |
| name | No | Wildcard case-insensitive search in application name | |
| stream | No | Wildcard case-insensitive search in stream name | |
| published | No | Filter by published status (true/false or 1/0). Default: true | true |
Implementation Reference
- Core handler function implementing the get_apps tool logic: fetches apps from Qlik Sense Repository API with filtering (name, stream, published), pagination, and returns minimal essential fields.def get_comprehensive_apps(self, limit: int = 25, offset: int = 0, name: Optional[str] = None, stream: Optional[str] = None, published: Optional[bool] = True) -> Dict[str, Any]: """ Get minimal list of apps with essential fields and proper filtering/pagination. Returns only: guid, name, description, stream, modified_dttm, reload_dttm. Supports case-insensitive wildcard filters for name and stream, and published flag. Enforces default limit=25 and maximum limit=50. """ if limit is None or limit < 1: limit = 25 if limit > 50: limit = 50 if offset is None or offset < 0: offset = 0 filters: List[str] = [] if published is not None: filters.append(f"published eq {'true' if published else 'false'}") if name: raw_name = name.replace('*', '') safe_name = raw_name.replace("'", "''") filters.append(f"name so '{safe_name}'") if stream: raw_stream = stream.replace('*', '') safe_stream = raw_stream.replace("'", "''") filters.append(f"stream.name so '{safe_stream}'") params: Dict[str, Any] = {} if filters: params["filter"] = " and ".join(filters) params["orderby"] = "modifiedDate desc" apps_result = self._make_request("GET", "app/full", params=params) if isinstance(apps_result, list): apps = apps_result elif isinstance(apps_result, dict): if "error" in apps_result: apps = [] else: apps = apps_result.get("data", []) or apps_result.get("apps", []) else: apps = [] minimal_apps: List[Dict[str, Any]] = [] for app in apps: try: is_published = bool(app.get("published", False)) stream_name = app.get("stream", {}).get("name", "") if is_published else "" minimal_apps.append({ "guid": app.get("id", ""), "name": app.get("name", ""), "description": app.get("description") or "", "stream": stream_name or "", "modified_dttm": app.get("modifiedDate", "") or "", "reload_dttm": app.get("lastReloadTime", "") or "", }) except Exception: continue if name: lowered = name.lower().replace('*', '') minimal_apps = [a for a in minimal_apps if lowered in (a.get("name", "").lower())] if stream: lowered_stream = stream.lower().replace('*', '') minimal_apps = [a for a in minimal_apps if lowered_stream in (a.get("stream", "").lower())] if published is not None: if published: minimal_apps = [a for a in minimal_apps if a.get("stream", "") != ""] else: minimal_apps = [a for a in minimal_apps if a.get("stream", "") == ""] total_found = len(minimal_apps) paginated_apps = minimal_apps[offset:offset + limit] return { "apps": paginated_apps, "pagination": { "limit": limit, "offset": offset, "returned": len(paginated_apps), "total_found": total_found, "has_more": (offset + limit) < total_found, "next_offset": (offset + limit) if (offset + limit) < total_found else None, }, }
- qlik_sense_mcp_server/server.py:227-258 (registration)MCP tool registration and schema definition for get_apps in the list_tools handler.Tool( name="get_apps", description="Get list of Qlik Sense applications with essential fields and filters (name, stream, published) and pagination.", inputSchema={ "type": "object", "properties": { "limit": { "type": "integer", "description": "Maximum number of apps to return (default: 25, max: 50)", "default": 25 }, "offset": { "type": "integer", "description": "Number of apps to skip for pagination (default: 0)", "default": 0 }, "name": { "type": "string", "description": "Wildcard case-insensitive search in application name" }, "stream": { "type": "string", "description": "Wildcard case-insensitive search in stream name" }, "published": { "type": "string", "description": "Filter by published status (true/false or 1/0). Default: true", "default": "true" } } } ),
- qlik_sense_mcp_server/server.py:428-466 (handler)MCP call_tool dispatcher handler for get_apps: parses arguments, converts types, delegates to repository_api.get_comprehensive_apps, formats JSON response.if name == "get_apps": limit = arguments.get("limit", 25) offset = arguments.get("offset", 0) name_filter = arguments.get("name") stream_filter = arguments.get("stream") published_arg = arguments.get("published", True) if limit is None or limit < 1: limit = 25 if limit > 50: limit = 50 def _to_bool(value: Any, default: bool = True) -> bool: if isinstance(value, bool): return value if isinstance(value, int): return value != 0 if isinstance(value, str): v = value.strip().lower() if v in ("true", "1", "yes", "y"): return True if v in ("false", "0", "no", "n"): return False return default published_bool = _to_bool(published_arg, True) apps_payload = await asyncio.to_thread( self.repository_api.get_comprehensive_apps, limit, offset, name_filter, stream_filter, published_bool, ) return [ TextContent( type="text", text=json.dumps(apps_payload, indent=2, ensure_ascii=False) ) ]
- Input schema validation for get_apps tool parameters (limit, offset, name, stream, published).inputSchema={ "type": "object", "properties": { "limit": { "type": "integer", "description": "Maximum number of apps to return (default: 25, max: 50)", "default": 25 }, "offset": { "type": "integer", "description": "Number of apps to skip for pagination (default: 0)", "default": 0 }, "name": { "type": "string", "description": "Wildcard case-insensitive search in application name" }, "stream": { "type": "string", "description": "Wildcard case-insensitive search in stream name" }, "published": { "type": "string", "description": "Filter by published status (true/false or 1/0). Default: true", "default": "true" } } } ),