Skip to main content
Glama
bintocher

Qlik Sense MCP Server

get_app_sheet_objects

Retrieve objects from a Qlik Sense sheet by providing the application and sheet IDs to access object details including type and description for analysis.

Instructions

Get list of objects from specific sheet with object ID, type and description.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
app_idYesApplication GUID
sheet_idYesSheet GUID

Implementation Reference

  • Handler for the 'get_app_sheet_objects' tool call. Opens the app via Engine API, retrieves sheet objects using helper method, formats output with object ID, type, and description.
    elif name == "get_app_sheet_objects":
        app_id = arguments["app_id"]
        sheet_id = arguments["sheet_id"]
    
        def _get_sheet_objects():
            try:
                self.engine_api.connect()
                app_result = self.engine_api.open_doc_safe(app_id, no_data=True)
                app_handle = app_result.get("qReturn", {}).get("qHandle", -1)
                if app_handle == -1:
                    return {"error": "Failed to open app"}
    
                # Get detailed objects from the sheet
                objects = self.engine_api._get_sheet_objects_detailed(app_handle, sheet_id) or []
    
                # Format objects according to requirements: id объекта, тип объекта, описание объекта
                formatted_objects = []
                for obj in objects:
                    if isinstance(obj, dict):
                        obj_info = {
                            "object_id": obj.get("object_id", ""),
                            "object_type": obj.get("object_type", ""),
                            "object_description": obj.get("object_title", "")
                        }
                        formatted_objects.append(obj_info)
    
                return {
                    "app_id": app_id,
                    "sheet_id": sheet_id,
                    "total_objects": len(formatted_objects),
                    "objects": formatted_objects
                }
    
            except Exception as e:
                return {"error": str(e), "details": f"Error getting objects for sheet {sheet_id} in app {app_id}"}
            finally:
                self.engine_api.disconnect()
    
        result = await asyncio.to_thread(_get_sheet_objects)
        return [TextContent(type="text", text=json.dumps(result, indent=2, ensure_ascii=False))]
  • Schema definition and registration of the 'get_app_sheet_objects' tool in the list_tools handler.
        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"]
        }
    ),
  • Core helper function that implements the logic to fetch detailed sheet objects using Qlik Engine API: GetObject for sheet, GetLayout to get children, then recursive GetObject/GetLayout for each object to extract type, title, and fields used.
    def _get_sheet_objects_detailed(self, app_handle: int, sheet_id: str) -> List[Dict[str, Any]]:
        """Get detailed information about objects on a sheet."""
        try:
            sheet_result = self.send_request("GetObject", {"qId": sheet_id}, handle=app_handle)
            if "qReturn" not in sheet_result or "qHandle" not in sheet_result["qReturn"]:
                logger.warning(f"Failed to get sheet object {sheet_id}: {sheet_result}")
                return []
    
            sheet_handle = sheet_result["qReturn"]["qHandle"]
            sheet_layout = self.send_request("GetLayout", [], handle=sheet_handle)
            if "qLayout" not in sheet_layout or "qChildList" not in sheet_layout["qLayout"]:
                logger.warning(f"No child objects in sheet {sheet_id}")
                return []
    
            child_objects = sheet_layout["qLayout"]["qChildList"]["qItems"]
            detailed_objects = []
    
            for child_obj in child_objects:
                obj_id = child_obj.get("qInfo", {}).get("qId", "")
                obj_type = child_obj.get("qInfo", {}).get("qType", "")
                if not obj_id:
                    continue
                try:
                    obj_result = self.send_request("GetObject", {"qId": obj_id}, handle=app_handle)
                    if "qReturn" not in obj_result or "qHandle" not in obj_result["qReturn"]:
                        continue
                    obj_handle = obj_result["qReturn"]["qHandle"]
                    obj_layout = self.send_request("GetLayout", [], handle=obj_handle)
                    if "qLayout" not in obj_layout:
                        continue
                    fields_used = self._extract_fields_from_object(obj_layout["qLayout"])
                    detailed_obj = {
                        "object_id": obj_id,
                        "object_type": obj_type,
                        "object_title": obj_layout["qLayout"].get("title", ""),
                        "object_subtitle": obj_layout["qLayout"].get("subtitle", ""),
                        "fields_used": fields_used,
                        "basic_info": child_obj,
                        "detailed_layout": obj_layout["qLayout"]
                    }
                    detailed_objects.append(detailed_obj)
                    logger.info(f"Processed object {obj_id} ({obj_type}) with {len(fields_used)} fields")
                except Exception as obj_error:
                    logger.warning(f"Error processing object {obj_id}: {obj_error}")
                    continue
    
            return detailed_objects
    
        except Exception as e:
            logger.error(f"_get_sheet_objects_detailed error: {str(e)}")
            return []
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves a list but doesn't describe key behaviors: whether it's paginated, rate-limited, requires specific permissions, returns empty lists for invalid inputs, or handles errors. For a read operation with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.

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

Conciseness5/5

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

The description is a single, efficient sentence that front-loads the core action ('Get list of objects') and specifies key details (source, returned fields). There is no wasted verbiage, repetition, or unnecessary elaboration—every word earns its place.

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

Completeness2/5

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

Given the tool's complexity (a read operation with 2 required parameters) and lack of annotations and output schema, the description is incomplete. It doesn't cover behavioral aspects (e.g., pagination, error handling), usage context, or return format details. While concise, it fails to provide sufficient context for an agent to use the tool effectively beyond basic parameter passing.

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?

The schema description coverage is 100%, with both parameters ('app_id' and 'sheet_id') documented as GUIDs for application and sheet. The description adds no additional meaning beyond the schema—it doesn't explain parameter relationships (e.g., sheet must belong to app) or provide examples. With high schema coverage, the baseline is 3, as the description doesn't compensate but also doesn't detract.

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 with a specific verb ('Get list of objects') and resource ('from specific sheet'), and specifies the returned fields ('object ID, type and description'). It distinguishes from some siblings like 'get_app_object' (singular) and 'get_app_sheets' (lists sheets, not objects), but doesn't explicitly differentiate from all potential alternatives like 'get_app_field' or 'get_app_field_statistics'.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing valid app and sheet IDs), compare with siblings like 'get_app_object' (for single objects) or 'get_app_field' (for fields), or specify use cases (e.g., for auditing or data exploration). The context is implied but not articulated.

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