Skip to main content
Glama
bintocher

Qlik Sense MCP Server

get_app_details

Retrieve detailed Qlik Sense application information including metadata, tables, fields, master items, and objects using GUID or name search to support analysis and management tasks.

Instructions

Get compact application info with filters by guid or name (case-insensitive). Returns metainfo, tables/fields list, master items, sheets and objects with used fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
app_idNoApplication GUID (preferred if known)
nameNoCase-insensitive fuzzy search by app name

Implementation Reference

  • Core handler function that executes the 'get_app_details' tool logic: resolves app identifier, authenticates via ticket, fetches and filters metadata from Proxy API, constructs response with metainfo, fields, and tables.
    elif name == "get_app_details":
        req_app_id = arguments.get("app_id")
        req_name = arguments.get("name")
    
        def _resolve_app() -> Dict[str, Any]:
            """Resolve application by ID or name from Repository API."""
            try:
                if req_app_id:
                    app_meta = self.repository_api.get_app_by_id(req_app_id)
                    if isinstance(app_meta, dict) and app_meta.get("id"):
                        return {
                            "app_id": app_meta.get("id"),
                            "name": app_meta.get("name", ""),
                            "description": app_meta.get("description") or "",
                            "stream": (app_meta.get("stream", {}) or {}).get("name", "") if app_meta.get("published") else "",
                            "modified_dttm": app_meta.get("modifiedDate", "") or "",
                            "reload_dttm": app_meta.get("lastReloadTime", "") or ""
                        }
                    return {"error": "App not found by provided app_id"}
                if req_name:
                    apps_payload = self.repository_api.get_comprehensive_apps(limit=50, offset=0, name=req_name, stream=None, published=None)
                    apps = apps_payload.get("apps", []) if isinstance(apps_payload, dict) else []
                    if not apps:
                        return {"error": "No apps found by name"}
                    lowered = req_name.lower()
                    exact = [a for a in apps if a.get("name", "").lower() == lowered]
                    selected = exact[0] if exact else apps[0]
                    selected["app_id"] = selected.pop("guid", "")
                    return selected
                return {"error": "Either app_id or name must be provided"}
            except Exception as e:
                return {"error": str(e)}
    
        def _get_app_details():
            """Get application details with metadata, fields and tables."""
            try:
                # Get app metadata from Repository API
                resolved = _resolve_app()
                if "error" in resolved:
                    return resolved
    
                app_id = resolved.get("app_id")
    
                # Get Qlik ticket for authentication
                ticket = self._get_qlik_ticket()
                if not ticket:
                    return {"error": "Failed to obtain Qlik ticket"}
    
                # Get fields and tables metadata via Proxy API
                metadata = self._get_app_metadata_via_proxy(app_id, ticket)
                if "error" in metadata:
                    return metadata
    
                # Build final response
                result = {
                    "metainfo": {
                        "app_id": app_id,
                        "name": resolved.get("name", ""),
                        "description": resolved.get("description", ""),
                        "stream": resolved.get("stream", ""),
                        "modified_dttm": resolved.get("modified_dttm", ""),
                        "reload_dttm": resolved.get("reload_dttm", "")
                    },
                    "fields": metadata.get("fields", []),
                    "tables": metadata.get("tables", [])
                }
    
                return result
    
            except Exception as e:
                return {"error": str(e)}
    
        details = await asyncio.to_thread(_get_app_details)
        return [
            TextContent(type="text", text=json.dumps(details, indent=2, ensure_ascii=False))
        ]
  • Input schema for 'get_app_details' tool defining parameters app_id (GUID) or name (fuzzy search), with oneOf validation requiring exactly one.
    Tool(
        name="get_app_details",
        description="Get compact application info with filters by guid or name (case-insensitive). Returns metainfo, tables/fields list, master items, sheets and objects with used fields.",
        inputSchema={
            "type": "object",
            "properties": {
                "app_id": {"type": "string", "description": "Application GUID (preferred if known)"},
                "name": {"type": "string", "description": "Case-insensitive fuzzy search by app name"}
            },
            "oneOf": [
                {"required": ["app_id"]},
                {"required": ["name"]}
            ]
        }
    ),
  • Tool registration in the list_tools handler where 'get_app_details' is defined and returned as part of the server's tool list.
    @self.server.list_tools()
    async def handle_list_tools():
        """
        List all available MCP tools for Qlik Sense operations.
    
        Returns tool definitions with schemas for Repository API and Engine API operations
        including applications, analytics tools, and data export.
        """
        tools_list = [
            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"
                        }
                    }
                }
            ),
            Tool(
                name="get_app_details",
                description="Get compact application info with filters by guid or name (case-insensitive). Returns metainfo, tables/fields list, master items, sheets and objects with used fields.",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "app_id": {"type": "string", "description": "Application GUID (preferred if known)"},
                        "name": {"type": "string", "description": "Case-insensitive fuzzy search by app name"}
                    },
                    "oneOf": [
                        {"required": ["app_id"]},
                        {"required": ["name"]}
                    ]
                }
            ),
    
            Tool(name="get_app_script", description="Get load script from app", inputSchema={"type": "object", "properties": {"app_id": {"type": "string", "description": "Application ID"}}, "required": ["app_id"]}),
            Tool(name="get_app_field_statistics", description="Get comprehensive statistics for a field", inputSchema={"type": "object", "properties": {"app_id": {"type": "string", "description": "Application ID"}, "field_name": {"type": "string", "description": "Field name"}}, "required": ["app_id", "field_name"]}),
            Tool(name="engine_create_hypercube", description="Create hypercube for data analysis with custom sorting options. IMPORTANT: To get top-N records, use qSortByExpression: 1 in dimension sorting with qExpression containing the measure formula (e.g., 'Count(field)' for ascending, '-Count(field)' for descending). Measure sorting is ignored by Qlik Engine.", inputSchema={
                "type": "object",
                "properties": {
                    "app_id": {"type": "string", "description": "Application ID"},
                    "dimensions": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "field": {"type": "string", "description": "Field name for dimension"},
                                "label": {"type": "string", "description": "Optional label for dimension"},
                                "sort_by": {
                                    "type": "object",
                                    "properties": {
                                        "qSortByNumeric": {"type": "integer", "description": "Sort by numeric value (-1 desc, 0 none, 1 asc)", "default": 0},
                                        "qSortByAscii": {"type": "integer", "description": "Sort by ASCII value (-1 desc, 0 none, 1 asc)", "default": 1},
                                        "qSortByExpression": {"type": "integer", "description": "Use expression for sorting (0/1). For top-N results, set to 1 and use qExpression with measure formula", "default": 0},
                                        "qExpression": {"type": "string", "description": "Expression for custom sorting. For top-N: 'Count(field)' for ascending, '-Count(field)' for descending", "default": ""}
                                    },
                                    "additionalProperties": False
                                }
                            },
                            "additionalProperties": False
                        },
                        "description": "List of dimension definitions with optional sorting"
                    },
                    "measures": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "expression": {"type": "string", "description": "Measure expression"},
                                "label": {"type": "string", "description": "Optional label for measure"},
                                "sort_by": {
                                    "type": "object",
                                    "properties": {
                                        "qSortByNumeric": {"type": "integer", "description": "Sort by numeric value (-1 desc, 0 none, 1 asc). NOTE: Measure sorting is ignored by Qlik Engine - use dimension sorting with qSortByExpression for top-N results", "default": -1}
                                    },
                                    "additionalProperties": False
                                }
                            },
                            "additionalProperties": False
                        },
                        "description": "List of measure definitions with optional sorting"
                    },
                    "max_rows": {"type": "integer", "description": "Maximum rows to return", "default": 1000}
                },
                "required": ["app_id"]
            })
            ,
            Tool(
                name="get_app_field",
                description="Return values of a single field from app with pagination and wildcard search (supports * and %).",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "app_id": {"type": "string", "description": "Application GUID"},
                        "field_name": {"type": "string", "description": "Field name"},
                        "limit": {"type": "integer", "description": "Max values to return (default: 10, max: 100)", "default": 10},
                        "offset": {"type": "integer", "description": "Offset for pagination (default: 0)", "default": 0},
                        "search_string": {"type": "string", "description": "Wildcard text search mask (* and % supported), case-insensitive by default"},
                        "search_number": {"type": "string", "description": "Wildcard numeric search mask (* and % supported)"},
                        "case_sensitive": {"type": "boolean", "description": "Case sensitive matching for search_string", "default": False}
                    },
                    "required": ["app_id", "field_name"],
                }
            ),
            Tool(
                name="get_app_variables",
                description="Return variables split by source (script/ui) with pagination and wildcard search.",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "app_id": {"type": "string", "description": "Application GUID"},
                        "limit": {"type": "integer", "description": "Max variables to return (default: 10, max: 100)", "default": 10},
                        "offset": {"type": "integer", "description": "Offset for pagination (default: 0)", "default": 0},
                        "created_in_script": {"type": "string", "description": "Return only variables created in script (true/false). If omitted, return both"},
                        "search_string": {"type": "string", "description": "Wildcard search by variable name or text value (* and % supported), case-insensitive by default"},
                        "search_number": {"type": "string", "description": "Wildcard search among numeric variable values (* and % supported)"},
                        "case_sensitive": {"type": "boolean", "description": "Case sensitive matching for search_string", "default": False}
                    },
                    "required": ["app_id"],
                }
            ),
            Tool(
                name="get_app_sheets",
                description="Get list of sheets from application with title and description.",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "app_id": {"type": "string", "description": "Application GUID"}
                    },
                    "required": ["app_id"]
                }
            ),
            Tool(
                name="get_app_sheet_objects",
                description="Get list of objects from specific sheet with object ID, type and description.",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "app_id": {"type": "string", "description": "Application GUID"},
                        "sheet_id": {"type": "string", "description": "Sheet GUID"}
                    },
                    "required": ["app_id", "sheet_id"]
                }
            ),
            Tool(
                name="get_app_object",
                description="Get specific object layout by calling GetObject and GetLayout sequentially via WebSocket.",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "app_id": {"type": "string", "description": "Application GUID"},
                        "object_id": {"type": "string", "description": "Object ID to retrieve"}
                    },
                    "required": ["app_id", "object_id"]
                }
            )
            ]
        return tools_list
  • Helper function to filter app metadata, removing system/reserved/hidden fields and renaming cardinal to unique_count, used in get_app_details response preparation.
    def _filter_metadata(self, metadata: Dict[str, Any]) -> Dict[str, Any]:
        """Filter metadata to remove system fields and hidden items."""
        # Fields to remove from output
        fields_to_remove = {
            'is_system', 'is_hidden', 'is_semantic', 'distinct_only',
            'is_locked', 'always_one_selected', 'is_numeric', 'hash',
            'tags', 'has_section_access', 'tables_profiling_data',
            'is_direct_query_mode', 'usage', 'reload_meta', 'static_byte_size', 'byte_size', 'no_of_key_fields'
        }
    
        # Qlik Sense reserved fields to remove
        qlik_reserved_fields = {'$Field', '$Table', '$Rows', '$Fields', '$FieldNo', '$Info'}
    
        def filter_object(obj):
            """Recursively filter object."""
            if isinstance(obj, dict):
                filtered = {}
                for key, value in obj.items():
                    # Skip fields to remove
                    if key in fields_to_remove:
                        continue
    
                    # Skip fields with is_system: true or is_hidden: true
                    if isinstance(value, dict):
                        if value.get('is_system') or value.get('is_hidden'):
                            continue
                        # Replace cardinal with unique_count
                        if key == 'cardinal':
                            filtered['unique_count'] = value
                            continue
    
                    # Recursively filter nested objects
                    filtered[key] = filter_object(value)
                return filtered
            elif isinstance(obj, list):
                # Filter field arrays, removing reserved Qlik fields
                if obj and isinstance(obj[0], dict) and 'name' in obj[0]:
                    # This is a fields array
                    return [filter_object(item) for item in obj if item.get('name') not in qlik_reserved_fields]
                else:
                    return [filter_object(item) for item in obj]
            else:
                return obj
    
        # Keep only fields and tables
        filtered = filter_object(metadata)
        result = {}
    
        if 'fields' in filtered:
            result['fields'] = filtered['fields']
        if 'tables' in filtered:
            result['tables'] = filtered['tables']
    
        return result
  • Repository API helper method get_app_by_id used by get_app_details to fetch app metadata by GUID.
    def get_app_by_id(self, app_id: str) -> Dict[str, Any]:
        """Get specific app by ID."""
        return self._make_request("GET", f"app/{app_id}")
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the return content ('metainfo, tables/fields list, master items, sheets and objects with used fields'), which adds useful context beyond basic retrieval. However, it lacks details on permissions, rate limits, error handling, or whether this is a read-only operation (though 'Get' implies read). The description compensates somewhat but leaves gaps for a tool with no annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, dense sentence that efficiently covers purpose, filters, and return values. It's front-loaded with the core action ('Get compact application info') and avoids redundancy. However, it could be slightly more structured (e.g., separating filtering from returns) for better readability, but it earns its place with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and 2 parameters with full schema coverage, the description is moderately complete. It explains what the tool does and what it returns, which is essential for understanding. However, for a tool with no output schema, it doesn't detail the structure of returned data (e.g., format of 'metainfo'), and with no annotations, it misses behavioral aspects like safety or constraints. It's adequate but has clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters (app_id and name) with descriptions. The description adds marginal value by noting 'case-insensitive fuzzy search by app name' and 'preferred if known' for app_id, but doesn't provide additional syntax, format, or examples beyond what the schema offers. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get compact application info' with specific filtering capabilities by 'guid or name (case-insensitive)'. It distinguishes itself from siblings like 'get_apps' (likely listing apps) by focusing on detailed info for a single app, though it doesn't explicitly name alternatives. The verb 'Get' and resource 'application info' are specific.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by mentioning filters 'by guid or name', suggesting this tool is for retrieving details of a specific app rather than listing all apps. However, it doesn't explicitly state when to use this vs. siblings like 'get_apps' (for listing) or 'get_app_object' (for specific objects), nor does it provide exclusions or prerequisites. The guidance is implied but not comprehensive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/bintocher/qlik-sense-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server